SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

ASP.NET, MOSS and App Pool identities

 I recently had question from my friend that is using ASP.NET and MOSS on the same server. He had issue similar to this:

He has developed ASP.NET web application that is opening MOSS site using object model, with

SPSite site = new SPSite("SOMEURL");

 ...

and he had an issue that in debug mode using Visual Studio web server everything was working ok, but when application is deployed on IIS, he couldn't open MOSS site, with following error:

The Web application at SOMEURL could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

That is caused by the fact that by default ASP.NET and WSS Application Pools are running under different identities, even on same IIS. SO, one workaround we found was to simply change ASP.NET Application Pool so that it is run under same identity as MOSS, like this:

1. Start IIS Manager
2. Open Application Pools in left tree view
3. Open properties window for WSS application pool (Right click... properties)
4. Write down identity that this application pool is running under (on Identity tab) and then close this properties window
5. Now, open properties window for ASP.NET application pool (Right click... properties)
6. Select same identity as on WSS application pool (on Identity tab) and click OK
7. Restart IIS.
 


Posted 10-18-2007 9:43 AM by panjkov

Comments

Links (10/18/2007) « Steve Pietrek’s SharePoint Stuff wrote Links (10/18/2007) « Steve Pietrek’s SharePoint Stuff
on 10-18-2007 7:28 PM

Pingback from  Links (10/18/2007) « Steve Pietrek’s SharePoint Stuff

SharePoint 2007 Link love: 10-24-2007 at Virtual Generations wrote SharePoint 2007 Link love: 10-24-2007 at Virtual Generations
on 10-24-2007 1:25 AM

Pingback from  SharePoint 2007 Link love: 10-24-2007 at  Virtual Generations

Mitali wrote re: ASP.NET, MOSS and App Pool identities
on 11-13-2008 12:27 AM

Hi I am getting the similar error....but the appl is console not a web appl.

I have checked the URLs under the site in central admin-> appl mgmt...the url exists there...

Please help....

panjkov wrote re: ASP.NET, MOSS and App Pool identities
on 11-13-2008 1:22 AM

It is simple - your identity under you run your console app should be member of the computer administrators group, or must be same account under which that application pool is run.

Mitali wrote re: ASP.NET, MOSS and App Pool identities
on 11-13-2008 2:38 AM

I am logged in as administrator...

The same user is site adminstrator and identity in the app pool....

panjkov wrote re: ASP.NET, MOSS and App Pool identities
on 11-13-2008 4:21 AM

can you share your code?

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.