BE.NET and Virtual Directories

Topics: ASP.NET 2.0
Aug 7, 2007 at 6:08 AM
I'm running BE.NET on IIS 6 on a FQDN (www.XYZ.com). Is there a way I can create a sort of sand-box under my domain name where I can test my applications and let other people see them (www.XYZ.com/test1/)?

If i try to create a virtual directory in IIS under the www.XYZ.com website it won't let me run any virtual directory application. It's hanging on the URL rewrite HTTP handler I believe and I've tried created a separate App Pool with no success.

Any thoughts or am I using BE.NET beyond what it's designed for?

Thanks!
Brad
Aug 17, 2007 at 12:57 AM
Does it have to be a virtual directory? If not, it's a pretty straight forward, easy process to make it work:

- Create the directory under the WWW parent root (e.g. www.XYZ.com points to C:\Inetpub\Xyz\ -create a folder there e.g. "blog")
- Copy all the related .NET engine files (web project) into this folder (e.g. C:\Inetpub\xyz\blog)
- This is the main step: make sure in IIS you set this as application root - that's as far as I know the only requirement for BE.NET to work

Does that work?
Mike
Aug 20, 2007 at 10:54 PM
I ran into this same issue when trying to install in a subfolder underneath a DotNetNuke installation. To get beyond the problems with the httpModules and httpHandlers, I had to remove all entries that were setup in the root web.config. I'm sure your entries will vary, but I've listed the relevant portion of my web.config below. If anyone else has a better way to handle this, please let us know.

Hope this helps.
Michael Paladino

<httpModules>
<remove name="UrlRewrite" />
<remove name="Exception" />
<remove name="UsersOnline" />
<remove name="ProfilePrototype" />
<remove name="AnonymousIdentificationPrototype" />
<remove name="RoleManagerPrototype" />
<remove name="DNNMembership" />
<remove name="Personalization" />

<add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite"/>
<add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule"/>
<add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule"/>
</httpModules>

<httpHandlers>
<remove verb="GET" path="FtbWebResource.axd" />
<remove verb="*" path="BTBGoogleSiteMap.axd" />

<add verb="*" path="microsummary.axd" type="BlogEngine.Core.Web.HttpHandlers.MicroSummary" validate="false"/>
<add verb="*" path="file.axd" type="BlogEngine.Core.Web.HttpHandlers.FileHandler" validate="false"/>
<add verb="*" path="image.axd" type="BlogEngine.Core.Web.HttpHandlers.ImageHandler" validate="false"/>
<add verb="*" path="syndication.axd" type="BlogEngine.Core.Web.HttpHandlers.SyndicationHandler" validate="false"/>
<add verb="*" path="commentfeed.axd" type="BlogEngine.Core.Web.HttpHandlers.CommentFeedHandler" validate="false"/>
<add verb="*" path="sitemap.axd" type="BlogEngine.Core.Web.HttpHandlers.Sitemap" validate="false"/>
<add verb="*" path="trackback.axd" type="BlogEngine.Core.Web.HttpHandlers.TrackbackHandler" validate="false"/>
<add verb="*" path="pingback.axd" type="BlogEngine.Core.Web.HttpHandlers.PingbackHandler" validate="false"/>
<add verb="*" path="opensearch.axd" type="BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler" validate="false"/>
<add verb="*" path="metaweblog.axd" type="BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler" validate="false"/>
<add verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler" validate="false"/>
<add verb="*" path="css.axd" type="BlogEngine.Core.Web.HttpHandlers.CssHandler" validate="false"/>
</httpHandlers>
Nov 27, 2007 at 7:25 PM
I am in the same boat as mjpalad. I use DotNetNuke but really want to incorporate BlogEngine as my blog. I need to avoid having to manage multiple user accounts. That being said is there a way to use the user accounts in DotnetNuke for BlogEngine.Net? I have looked but haven't found any documentation on how to make this happen...

Thanks in advance!

Chris
Nov 27, 2007 at 10:22 PM
Have you considered using the same machineKey as the one used by DNN? Combine that with the same Membership provider configuration as that in DNN, especially the applicationName, and you should be essentially doing Single-Sign-On (SSO) between your 2 ASP.NET applications.
Nov 27, 2007 at 10:50 PM
That sounds like an excellent idea. Unfortunately I am a bit of a novice and wouldn't know exactly how to make that work... Would you have a few cycles to help me through the process? I will document the steps and post them here for anyone else interested!

Chris
Nov 27, 2007 at 10:56 PM
Edited Nov 27, 2007 at 10:58 PM
oops...

Nov 27, 2007 at 10:58 PM
Couldn't you just use a <clear /> at the top of the section?

More info at http://weblogs.asp.net/scottgu/archive/2006/11/20/common-gotcha-don-t-forget-to-clear-when-adding-providers.aspx

Example:
<httpHandlers>
<clear />
<!-- remove verb="GET" path="FtbWebResource.axd" / -->
<!-- remove verb="*" path="BTBGoogleSiteMap.axd" / -->

<add verb="*" path="microsummary.axd" type="BlogEngine.Core.Web.HttpHandlers.MicroSummary" validate="false"/>
</httpHandlers>

Chris
Nov 28, 2007 at 12:04 AM
Edited Nov 28, 2007 at 12:05 AM
oops
Nov 28, 2007 at 12:04 AM
My clean installation of BE.Net won't fire up correctly. I have I created a virtual directory under my DotNetNuke site called Chris (http://www.dev.local/chris) and copied the Be.NET files into the folder. I updated the web.config to include the <clear /> at the top of the httphandlers, providers, modules sections. I also updated the appSettings section to include the updated root path of ~/chris/ . When I launch the site I get an error indicating “The name ‘Resources’ does not exist in the current document”. It seems to hang on various control files, (appcode\controls\recentposts.cs line 73) and (appcode\controls\BreakPost.cs line 55)…

This is a new, clean installation. Does anyone have an idea on what's going on?

Chris
Nov 28, 2007 at 2:16 PM


dscoduc wrote:
Couldn't you just use a <clear /> at the top of the section?

More info at http://weblogs.asp.net/scottgu/archive/2006/11/20/common-gotcha-don-t-forget-to-clear-when-adding-providers.aspx

Example:
<httpHandlers>
<clear />
<!-- remove verb="GET" path="FtbWebResource.axd" / -->
<!-- remove verb="*" path="BTBGoogleSiteMap.axd" / -->

<add verb="*" path="microsummary.axd" type="BlogEngine.Core.Web.HttpHandlers.MicroSummary" validate="false"/>
</httpHandlers>

Chris



I tried using <clear/>, but when I did that I got an error "No http handler was found for request type 'GET' ". I assumed that was because there was a "GET" httpHandler defined further up in the chain that <clear/> wiped out. So, then I went with the <remove...> approach and that worked for me.