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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Errors with deployed app on server (no errors on local host)

Status
Not open for further replies.

jmeckley

Programmer
Jul 15, 2002
5,269
0
0
US
I have my first ASP.Net app that I am attempting to roll out to our server so users can access this application. The system works find on my local machine. However it does not work when I access it from the server.

The piece that is not working is the code that refers to Active Directory.

The first errors that I get are when I actually build the solution. My solution consists of the web app and a deploy package. The deploy package has the follow pieces to it:[tt]
File System on Target Machine
Web Application Folder [Folder icon]
Bin [type: folder]
Content File from DubRequest (active) [type: output]
Primary output from DubRequest (active) [type: output]
[/tt]
When I build the solution I get 2 build errors.[tt]
1. 'activeds.tbl' should be excluded because is source file 'C:\WINDOWS'System32\activeds.tbl' is under windows system file protection.
2. (low priority) This setup does not contain the .Net framework which must be installed on the target machine by running dotnetfix.exe before this setup will install. you can find dotnetfix.exe on the Visual Studio .Net 'Windows Component Update' media. dotnetfix.exe can be redistributed with your setup.
[/tt]
I install the web app on the server with no errors. Then when I go to the website from a remote machine I will get the following error when I reach the code referencing Active Directory.
[tt]Server Error in '/DubRequest_Test' Application.
-----------------------------------------------------------

Exception from HRESULT: 0x8000500C.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x8000500C.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x8000500c): Exception from HRESULT: 0x8000500C.]
ActiveDs.IADsUser.Groups() +0
DubRequest.WebForm1.Page_Load(Object sender, EventArgs e) +592
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724
-----------------------------------------------------------Version Information: Microsoft .NET Framework Version:1.0.3705.288; ASP.NET Version:1.0.3705.288
[/tt]
Everything runs fine from the local machine under my account. Any ideas why? I searched google for the error message above, but couldn't find anything helpful to my situation.

Thanks for your time

Jason Meckley
Database Analyst
WITF
 
Hi Jason,
To your first issue about Activeds.tbl:
EXCLUDE IT!! You're lucky that it has been file-protected on the server. What we have found (through pain and anguish, of course) is that if you include it in the setup project, it overwrites the existing copy of the file, and when you try to uninstall that project from your web server, it removes activeds.tbl from the operating system, which will cause other applications, possibly your OS to crash. Dot Net doesn't get the fact that it was already there and should stay. Very nasty business...

As to your Active Directory problem,

More than likely, one of two things is going on - 1) You don't have impersonation set to true in your web.config file. But if that was the case, then more than likely, it wouldn't have worked on your local machine either.
or 2) Impersonation doesn't actually work all that well with web applications. The default is to have the web server run all applications under a very generic Windows account, with very few permissions (for security reasons and other things I'm sure). Usually it's something like ASPNET_USER or something like that. When you're testing on your local machine, the web app is ACTUALLY running AS you. When you install it onto a remote web server, the application is running as ASPNET_USER. So when you try to jump off that box to get to AD, the ASPNET_USER account doesn't have permission to do this.

What we ended up doing was making the AD piece a web service and putting it on a COM box and then adding a web reference to all our projects that needed to use it. It seems to work...OK...

Hope this helps.

CHIX001
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top