WSS and ASP.NET

posted on 2005-06-23 at 00:35:58 by Joel Ross

I installed WSS as part of my Biztalk ramp-up - Biztalk uses it for some of it's services, such as BAS.

Anyway, it took me a few days before I realized how much WSS messes with the rest of your sites. It locks down ASP.NET development to the point of unusability (yes, I know that's not a word, but it should be!). You can't debug your apps, and once you turn that back on, you can't use session. Until you turn that on too! Oh - and before you do all that, you have to tell WSS that the virtual directory you're building your ASP.NET app in isn't a WSS managed directory.

After the frustration of the past week, here's my advice. If you can avoid installing WSS, do it!

Of course, if you're reading this closely, it's probably because you found it doing a search, and you don't have a choice - you need ASP.NET and WSS to work together. It's really not that bad. First, like I said, you have to add your desired virtual directory to the list of excluded directories in WSS. Once you do that, you have to add a few things to your web.config.

So what do you have to add? The first is a trust level. Under System.Web, you add the following entry:

<trust level="Full" originUrl="" />

Then, if you want to be able to use session, you have to add the following item:

<httpModules>
?<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
</httpModules>
?
<pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false" />


I think it's definitely worth noting that I found this issue while trying to do two things - first, get a pre-existing app up and running after installing WSS. Second, I was trying to create a web service from an orchestration in Biztalk Server. This post, by Bryan Corazza, was a huge help. I still get intermittent errors, but this post got me past constant errors.

Categories: ASP.NET