Sharepoint seems to be causing errors in our application

D

dave.stubbs

Hi,

We have a large web application, using ASP.NET/C# that runs quite
happily on a Windows 2003 server under IIS, but when we install it on a
server with sharepoint installed it keeps falling over with
NullReference exceptions.

These exceptions appear to be related to core objects such as base or
HttpContext.

We installed twice on the same Windows 2003 Server, once we installed
in wwwroot as part of the Default Web Site and configured sharepoint to
ignore the URL for this application, and the second time we installed
as a new web site (not part of the default).

The new web site version works perfectly, but the site running under
default web site just keeps giving these errors.

On a second Windows 2003 Server without sharepoint the default web site
is working perfectly, so our only working assumption so far is that
this has something to do with Sharepoint, but we don't know what.

I don't even know where to begin looking.

Any gurus got a clue?

Cheers
Dave
 
D

Dave

Looks like exactly what we have done so far. The problems aluded to
sound like what we have, but I would like to try and find the
resollution to the problems and not a work around if possible.

Does anyone have any details on what the security/resource issues are
related to running an ASP.NET application in a virtual host managed by
sharepoint? Remember we have chosen the option to exclude our
application from Sharepoint management.

Thanks
Dave
 
S

Shane Young

Could it be a problem with web.config permissions? I would actually try
posting over in
microsoft.public.sharepoint.portalserver.development also to see if they
have any ideas.
 
P

Peter Jakab

I agree Shane, there must be some web.config issues over there.

Remember, that for every setting that is not explicitly defined in the
applications web.config file, the defaults defined in the root (usually
c:\inetpub\wwwroot\web.config) config file! These settings are very
different if you have or dont have WSS or SPS intalled, for example settings
for session state are disabled by default, even the module is remarked,
impersonation is enabled bí default, and the code acess security settings
are set to WSS_Minimal or WSS_medium that can couse serious errors in your
application.

Hope this helps

Peter Jakab
 
D

Dave

Peter,

Thanks, that put me on the right track.

I found that SPS turns off session handling and unless an application
explicitly turns it back on, then you get all the errors we were
seeing.

Here are the lines I ended up adding into our applications web.config.

<!--
Set the trust to Full. WSS configures a very restrictive trust
policy that does not allow ASP.NET Web application to run correctly.
-->
<trust level="Full" originUrl="" />
<!--
Enable the session module. This can also be enabled on the WSS
Web.config, but is not enabled by default.
If you receive the following message: Parser Error Message: The
module 'Session' is already in the
application and cannot be added again. You can remove the
following <httpModules></httpModules>
section as session is already enabled on the virtual server.
-->
<httpModules>
<add name="Session"
type="System.Web.SessionState.SessionStateModule"/>
</httpModules>
<!--
Enable session state for all the pages in the Web application.
-->
<pages enableSessionState="true" enableViewState="true"
enableViewStateMac="true" validateRequest="false" />


Works like a charm now.

Thanks all.
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top