Publishing ASP.NET 1.1 App to Windows Sharepoint Services Web Site
Yesterday I built a small web site and I tried to publish it to my usual web site www.dotnetlounge.co.nz. This site has been entirely running Windows Sharepoint Services until now. I used Sharepoint Central Administration to exclude my virtual directory from WSS and I ran my MSI installer on the machine. The WSS web site is the default and my MSI which was created with Visual Studio .NET 2003 only installs to the default web site. My server is running Windows Server 2003 and is also a domain controller.
Well it all turned to custard and I had to create a new web site on the machine, differentialted by a new host header. So now to isntall updates I have to run the MSI and then manually copy the files from the default web site to the alternate. Also, I can't use the dotnetlounge URL.
How can you install an ASP.NET application to a virtual directory that's under a Windows Sharepoint Services web site?
Here's the error that I got. Clearly my web site can't get System.Web.AspNetHostingPermission. I played around with the settings for a while and did a few google searches but no result so far. I believe it's something to do with the custom security settings created by Windows Sharepoint Services, the web site isn't on a network share.
I'll keep researching...
Server Error in '/NZSurvey' Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type System.Web.AspNetHostingPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
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:
|
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
Comments
- Anonymous
May 09, 2004
As you know (or maybe not?), when you extend a virtual server for WSS, WSS imposes a number of WSS-specific extentions basically taking over the virtual server that's running your WSS site. If you want an ASP.NET app to run in a directory within your WSS web, you'll need to deploy your app under the "_layouts" directory in your WSS web. It's important that you do this so that WSS won't try to content for your site in the WSS content database.
That would be the first thing I try to make sure that your app at least runs correctly.
Are you also trying to redirect to your app when you enter www.dotnetlounge.co.nz? - Anonymous
May 09, 2004
To Lamont: Thanks for replying I did know all that. I had thought that the Exclude Directory command would allow me to bypass the WSS addins. Layouts dir is no good for me - I don't like the resulting URLs. You can also put .ASPX pages into document libraries and run code there. I have ended up deploying to http://www.vs.net.nz/nzsurvey instead. - Anonymous
May 09, 2004
The comment has been removed - Anonymous
July 24, 2004
The comment has been removed - Anonymous
July 24, 2004
Actually, I managed to cajole my app into working. The trick was to create a trusted code group by URL and add my (WSS excluded) app to that group (also have the .DLL in the GAC which is probably redundant). It is fairly ugly I grant you, but it works without having to move the app into _layouts or using a non-WSS URL. HTH,
Alex