Problems debugging with local IIS

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/26/2008 4:59:20 PM
Gravatar
Total Posts 45

Problems debugging with local IIS

I'm running mojo with multiple sites on a local IIS (on Windows XP Pro) with sites mapped to folders. This configuration forces mojo to be deployed as the root application. My other web applications are running in virtual folders off the root. In order to get mojo to play nicely with my other apps, I've had to wrap much of the web.config inside a <location path="." inheritInChildApplications="false"></location> element. This works great when simply running the web apps.

A problem arises when trying to debug either mojo or any of my other web applications. VS.NET doesn't like the fact that the <compilation debug="true"></compilation> element is wrapped inside the location element. Pulling the compilation element outside the location element allows mojo to be run in debug mode, but this causes an issue for all my other web applications because the compilation element also includes:

<assemblies>

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add assembly="Microsoft.Web.Preview, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</assemblies>

When running my other web apps, whether normally or in debug mode, an error is generated because ASP.NET can't find the Microsoft.Web.Preview assembly.

Has anybody found a way to work around this issue?

8/27/2008 6:38:58 AM
Gravatar
Total Posts 18439

Re: Problems debugging with local IIS

Hi,

This ia a common issue in ASP.NET development, that if a site is running in a virtual directory like http://localhost/mojoportal and there is another ASP.NET application running in the root folder at http://localhost, the one in the root affects the ones in sub folders because of its web.config file.

So generally its best if you can just keep everything in virtual directories and not have any ASP.NET app running in the root at localhost. However, for folder based multiple sites, the only way to test it is running from the root web site. What I do is generally keep my root Web pointing to an empty folder except when I'm testing folder based multi sites. So most of the time I'm developing using http://localhost/mojoportal, but when I need to test folder sites I just point the root web away from the empty folder and to the same folder the /mojoportal points to. When I'm done testing this I just point the main web site back to the empty folder and resume using http://localhost/mojoportal

For host name based multi sites you can still use virtual directories even though in actual production it will be a root site like http://somehostname, on development I can test it with the first site being http://localhost/mojoportal and the second site being at http://somehostname/mojoportal. All I have to do is add this to my c:\Windows\System32\Drivers\etc\hosts file:
127.0.0.1 somehostname

Hope it helps,

Joe

8/27/2008 1:59:01 PM
Gravatar
Total Posts 45

Re: Problems debugging with local IIS

I wasn't aware that mojo could be deployed in a virtual folder even when using host name mapping. That helps a lot. Thanks!

You must sign in to post in the forums. This thread is closed to new posts.