Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems while executing an Exe in our website

Status
Not open for further replies.

dharam

Programmer
Joined
Sep 5, 2001
Messages
1
Location
US
Hi All,

We are facing a problem and are not able to resolve it since last 2 weeks.
We are using Win2k Server with IIS 5.0 with integrated windows authentication.

The problem is as below:

We have two Exes: PrimaryExe and a SecReportExe for Reports. The primaryExe continuously runs as a background process checking continuously whether any Report has been submitted. If a report has been submitted, it creates an instance of SecReportExe (max upto 5) and completes the Report.
The problem is whenever a PrimaryExe tries to create an object, the error message says access denied.
There was a problem that our production box wasnt built up properly. While the box was being built the Production box name was say "TestBox" and after the IIS was installed its name was changed to "ProdBox". Because of this we have 2 pairs of IUSR and IWAM users. eg IUSR_TestBox and IUSR_ProdBox.
We tried giving all the permissions to both the users but havent yet able to solve the problem.

The code in PrimaryExe which creates and instance of SecReportExe is as follows:

Private Sub Class_Initialize()
' # 001. added the error handler.
Dim lstrErrDesc As String
Dim lintfh As Integer
On Error GoTo ErrorHandler
'mObjExeInstance.
Set mObjExeInstance = CreateObject("srvSecReportExe.clsSecReport")
busy_flag = False

' # 001.
Exit Sub
ErrorHandler:
lstrErrDesc = Err.Description
On Error Resume Next
lintfh = FreeFile
Open App.Path & "\RPTLOG.TXT" For Append Shared As #lintfh
Write #lintfh,
Write #lintfh, "Error - PrimaryReportExe on " & Date & " at " & Time
Write #lintfh, "Error In Creating SecreportExe - " & Trim(lstrErrDesc)
Write #lintfh,
' Close before reopening in another mode.
Close #lintfh
' ' Send the error message as a mail to Maintenance team.
' frmReport.gfnblnSendMail lstrErrDesc
End Sub


Could you please advise us on what could exactly be creating a problem because we do not want to rebuild the server if possible. ;-)

Thanks in advance
 
Good news, you dont need to rebuild your server....we hope!

The duplicate IUSER_MACHINE name thing is common, matter of fact any IT guy who works in a large enterprise will see this alot if they use sysprep images for Servers. Windows 2000 will check and actually automatically create a new IUSER and IWAM account after you change the name of IUSER and IWAM. I haven't figured it out totally but I have seen this many times...

First things first, check who IIS is using for its anonymous user, this will tell you whether the testbox or prodbox user is the real anonymous user. I am assuming you have run the application locally as administrator and it works fine, if not it may be that your application doesn't work.

If your pretty sure its just the server and not the app...

Your issue is permissions. Your going to need a tool to fix this problem. has a free permission tool called Filemon. Run filemon, then do your executable stuff until you generate your error, then go back through the log for filemon and see where it says 'access denied.'

Filemon creates a huge log really quick so work fast. It is best if you generate the error remotely through the web as the anonymous user, and whomever is logged in on the console does nothing while filemon is running, filemon monitors every single little thing on the server, so disable your virus checker and other unneeded stuff while you do this or your log will be outragous quickly and be a mess looking over later.

You can repeat this process until you figure out all the file permission issues on the box. You may also need to do the same with the registry, particularly if you have been fooling around with the anonymous users alot....but don't worry, at you can also download a tool called regmon that can check permissions for the registry just like filemon does for files.

Just look for 'access denied' and check your NTFS permissions, hopefully 10 minutes later you will be back in business.

Let me know how it works out, and definately let me know if you figure out this multiple IUSER/IWAM thing, I have seen it alot and have yet to totally understand what is going on there with W2K, only that I always end up deleting a couple extra users after changing the names.

Raymond
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top