Multiple Blogs

Topics: Controls
Sep 16, 2011 at 2:25 PM

Hello Everyone

I was planning to make a new blog with BE.NET and I will need the new multiple blog support. I created the new website on my test-server and the primary blog works without a problem. Then I created a new blog however it doesn't work as it should.

The primary blog is at http://www.example.com/blog

The new one is set to be Name: TestBlog - Hostname: [blank] - Virtual Path: ~/testblog

I can create that and then the link to the test blog appears as http://www.example.ch/blog/testblog/ but behind that link I just get a "The page cannot be found"

Anyone know what's going wrong?

Sep 19, 2011 at 9:37 AM

I created a virtual directory within IIS which seems to solve the Problem that there's nothing visible but I get a new error now. That error only appears in the new testblog, the primary one still works without a problem.

There is no 'PassportAuthentication' module in the application to remove.

Anyone may now know what's going on?

Line 127:			<add name="RightModule" type="BlogEngine.Core.Right, BlogEngine.Core"/>
Line 128:			<!--Remove the default ASP.NET modules we don't need-->
Line 129:			<remove name="PassportAuthentication"/>
Line 130:			<remove name="Profile"/>
Line 131:			<remove name="AnonymousIdentification"/>

Source File:  ...blog\web.config    Line:  129             

 

Sep 19, 2011 at 3:58 PM

I've seen exactly the same behavior before and after adding a virtual directory.  The primary blog works perfectly.   When I navigate to additional blogs, I receive a 404 error.  If I add a virtual directory for the secondary blog, I receive the following error:

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: There is no 'PassportAuthentication' module in the application to remove.

Source Error:

Line 127:			<add name="RightModule" type="BlogEngine.Core.Right, BlogEngine.Core"/>
Line 128:			<!--Remove the default ASP.NET modules we don't need-->
Line 129:			<remove name="PassportAuthentication"/>
Line 130:			<remove name="Profile"/>
Line 131:			<remove name="AnonymousIdentification"/>


Source File: D:\Blog25\web.config    Line: 129

Coordinator
Sep 20, 2011 at 1:31 PM

I don't think creating a virtual directory is the right approach for the sub-blogs.  Virtual directories I believe are basically sub-applications or virtual applications, whereas the multiple blog capability is intended to all run within one single application.  The application code and in-memory data between the primary blog and the virtual directories will be separate ... almost like 2 separate applications.

Are you on IIS6 or IIS7?  When the sub-blog is using a virtual path, you'll want to make sure that a physical directory for that does not exist.  So if the virtual path is ~/testblog, then a physical directory for "testblog" should not exist.

Coordinator
Sep 20, 2011 at 1:46 PM

Another thing you can try if you are on IIS7, try adding the "runAllManagedModulesForAllRequests" attribute to the <modules> tag under <system.webServer> as shown below.

<system.webServer>
  <modules runAllManagedModulesForAllRequests="True" >
    ...
  </modules>
<system.webServer>
Sep 20, 2011 at 4:03 PM

You're right about the virtual directory, it just runs the primary blog as a new application under the new url.

I am running IIS version 6 on Windows Server 2003 SP 2 and there is no physical directory that conflicts with the sub-blog name.

Thanks!

Coordinator
Sep 21, 2011 at 12:28 AM

You might want to see this post:

http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/

The top part explains and has a screenshot of the IIS6 settings to add a "wildcard application mapping" for the aspnet_isapi.dll.  And to make sure the "Verify that file exists" checkbox is unchecked (as shown in the screenshot).  I'm not sure exactly if this is the solution to your situation, but could be.

Sep 21, 2011 at 3:07 PM

Here I am running the Blog under IIS 6 on Windows Server 2003 SP 2 too.

I always made sure that there's no phisical directory for the virtual path.

I'll try the solution you've posted BenAmada and will reply once I have the result. Thanks!

Sep 21, 2011 at 3:15 PM

And again, thanks a lot, that helped! The dll was not yet inserted and now it works.

Sep 21, 2011 at 8:42 PM

Thank you Ben, that has indeed solved the problem for me, too.  I never would have come up with that, thanks again.

Sep 22, 2011 at 7:52 AM

... However

After working on the new layout now for a day, I could sence MASSIVE performance loss on all blogs, even on the primary one. Not sure if this is the cause of adding the dll, but it happens since then >_<;

Coordinator
Sep 22, 2011 at 8:27 AM

Yes, it's probably because of the wildcard application mapping that is causing the slowness.  These posts:

http://stackoverflow.com/questions/583347/what-are-the-performance-implications-of-wildcard-mapping-all-requests-through-ii

http://stackoverflow.com/questions/323325/iis-6-0-wildcard-mapping-benchmarks

(or you can find others here)

One suggestion in the posts above is to turn off the wildcard application mapping on static folders, or folders where there is no dynamic content.  For example, it could be turned off on the "pics" folder, but I'm not sure how much performance you will gain back.  I guess in IIS6, the wildcard application mapping can be setup per folder ... rather than per application or website.

Probably the ideal way to go, if possible, would be to use subdomains rather than virtual paths.  Then you could turn off wildcard application mapping all together.

Sep 29, 2011 at 10:32 AM

Okay, the wildcard application was not the problem, this one works quiet good.

We had in the same application pool a .net 2.0 and a 4.0 application running. Once both started a service, the whole pool crashed.

But thank you anyway ^^