Help publishing it

Topics: ASP.NET 2.0
Feb 19, 2009 at 12:53 AM
Hi,
I made the setup successfully.
Here, it runs all the features, http://localhost:85/

Here, http://200.157.23.252/blog/default.aspx, a got the  follow error:

Server Error in '/' Application.


The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /blog/default.aspx

I have other sites that run just fine.

Please, how to fix it?

Thanks in advance,

Ricardo

Coordinator
Feb 19, 2009 at 12:59 AM
Not sure, but it looks like the live website is using IIS7.  Is your local machine (localhost) using IIS7 too?

Do you have a <system.webServer> section in your web.config file?
Feb 19, 2009 at 1:29 AM
Hi Ben,
Yes, I´m using IIS7 for localhost and website.
There isn´t '<system.webServer>' section.   I mean, in the 'web.config' that is located in '\wwwroot\BlogEngine.Web'.

Should be possible to you tell me what is needed?
Thanks in advance,
Ricardo
Coordinator
Feb 19, 2009 at 1:44 AM
The latest build of BE (available on the Source Code tab above) has a <system.webServer> section in the main web.config file.  The <system.webServer> section is used for IIS7.  It contains handlers and modules that are probably already defined in the <httpHandlers> and <httpModules> sections within your current web.config file.

I would extract the <system.webServer> section out of the latest version of BE and put it into your web.config file.  I'd also suggest deleting the entire <httpHandlers> and <httpModules> sections out of your web.config file because they won't be necessary if you're on IIS7 and you're using the <system.webServer> section.

You can either download the latest build of BE on the Source Code tab above, or the link below should bring up the latest web.config file in your browser.

http://www.codeplex.com/blogengine/SourceControl/changeset/view/25219#18456

At this point, I'm not sure if doing this will fix the 404 error you're getting ... just a guess.  But it's probably a good idea to use the <system.webServer> section since you're on IIS7.
Feb 19, 2009 at 3:25 AM

Hi Ben,
Thanks for your kindly attention.

I’ve made the changes that you suggested, but blog isn’t working  yet, in a real IP.

Please, if you can spare a few minutes:

 

Here I have one test site running ok: http://200.157.23.252/flavio/

Here, my fault blog (that runs fine in http://localhost): http://200.157.23.252/blog/

I would appreciate if you or someone else could bring some light here.

Have a pleasant evening,

Ricardo

Coordinator
Feb 19, 2009 at 4:00 AM
Edited Feb 19, 2009 at 4:42 AM
EDIT: Ignore this for now, my next message is more important for now :)

On your blog, do you know if it's setup to run in Integrated Mode?  It looks like it might be setup to run in Classic Mode right now.  In IIS7, if you select your blog site/application, on the right side there's a "Basic Settings" action.  If you click on that, what is the Application Pool?  It'll probably either be 'Classic .NET AppPool' or 'DefaultAppPool'.  If it's Classic, then select 'DefaultAppPool'.
Coordinator
Feb 19, 2009 at 4:33 AM
Edited Feb 19, 2009 at 4:37 AM
Btw, it appears your blog's url may actually be:

http://200.157.23.252/BlogEngine.web/default.aspx

Using the Url above, I get a generic .NET error -- instead of the 404 error we're seeing with the other url.

It looks like maybe your blog isn't setup as an application in IIS7?

If not, what you should do is move the BlogEngine.web folder outside of the "wwwroot" folder so it is no longer accessible via http://200.157.23.252/BlogEngine.web/default.aspx.  For instance, you can move the blog under the c:\ drive so it is c:\BlogEngine.web.  Then, you will want to go into IIS7, right-click on "Default Web Site" (or whatever your main website is), select "Add Application".  Then for the Alias, enter "blog", for the Application Pool, choose "DefaultAppPool" and then for the Physical Path, navigate to the place where you moved your Blogengine.web folder to (e.g. c:\BlogEngine.web).

This will make BE into it's own application running in "integrated mode" and you should then be able to get to the blog via http://200.157.23.252/blog/.
Feb 19, 2009 at 2:40 PM

Hi Bem

Again, thanks for your kindly help.

I’m writing this in hope that maybe you can forward it to tech support or else.

First of all, I tested your suggestions, and made the modification in directories.

Now, I have this:

1.       When I install the BlogEngine with “classic .net app pool”, the blog shows up in localhost flawlessly.   But in the http://200.157.23.252/blog, 404 error.

2.       When I install the BlogEngine with “default app pool”, even in localhost I got an error, 500.19.   And does't work in real IP too.


I hope this could help to solve this problem: I have the screenshots of the errors, if it could help: http://200.157.23.252/error.htm

Thanks in advance,
Ricardo

Coordinator
Feb 19, 2009 at 4:42 PM
Hi Ricardo,

Unfortunately, there is no tech support :)  It's just the people here on the Discussions helping others.  But I have hope we can figure this out!

I'm trying to access your server now including that error page (error.htm), but the server doesn't appear to be up now (nothing is coming back).

With the Classic .Net App Pool, you get a 404 error on the live server, right?  And you said it also doesn't work on the live server using the Default App Pool ... is that also a 404 error?

If you don't mind, can you post your web.config file here.  If there's any sensitive information, please remove that.

I'm also posting a web.config file below that I think should work on IIS7 using the Default App Pool.  You can try using the one below to see if it makes any difference.


<?xml version="1.0"?>
<configuration>
    <configSections>
        <sectionGroup name="BlogEngine">
            <section name="blogProvider" requirePermission="false" type="BlogEngine.Core.Providers.BlogProviderSection, BlogEngine.Core" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>
        </sectionGroup>
    </configSections>
    <BlogEngine>
        <blogProvider defaultProvider="XmlBlogProvider">
            <providers>
                <add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core"/>
                <add name="DbBlogProvider" type="BlogEngine.Core.Providers.DbBlogProvider, BlogEngine.Core" connectionStringName="BlogEngine"/>
            </providers>
        </blogProvider>
    </BlogEngine>
    <!-- configSource is not implemented in Mono.
    <connectionStrings configSource="sql.config" />
  -->
    <connectionStrings>
        <clear/>
        <add name="LocalSqlServer" connectionString="dummy"/>
        <!-- Mono complains if LocalSqlServer isn't specified -->
        <add name="BlogEngine" connectionString="Data Source=MySQLServer;User ID=user;Password=password;persist security info=False;initial catalog=BlogEngine;" providerName="System.Data.SqlClient"/>
    </connectionStrings>
    
    <appSettings>
        <add key="BlogEngine.FileExtension" value=".aspx"/>
        <!-- You can e.g. use "~/blog/" if BlogEngine.NET is not located in the root of the application -->
        <add key="BlogEngine.VirtualPath" value="~/"/>
        <!-- The regex used to identify mobile devices so a different theme can be shown -->
        <add key="BlogEngine.MobileDevices" value="(nokia|sonyericsson|blackberry|samsung|sec\-|windows ce|motorola|mot\-|up.b|midp\-)"/>
        <!-- The name of the role with administrator permissions -->
        <add key="BlogEngine.AdminRole" value="Administrators"/>
        <!--This value is to provide an alterantive location for storing data.-->
        <add key="StorageLocation" value="~/App_Data/"/>
        <!--A comma separated list of script names to hard minify. It's case-sensitive. -->
        <add key="BlogEngine.HardMinify" value="blog.js,widget.js,WebResource.axd"/>
    </appSettings>
    
    <system.web>
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
        
        <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="auto" uiCulture="auto"/>
        <httpRuntime enableVersionHeader="false" useFullyQualifiedRedirectUrl="true" maxRequestLength="16384" executionTimeout="3600" requestLengthDiskThreshold="16384"/>
        <machineKey validationKey="D9F7287EFDE8DF4CAFF79011D5308643D8F62AE10CDF30DAB640B7399BF6C57B0269D60A23FBCCC736FC2487ED695512BA95044DE4C58DC02C2BA0C4A266454C" decryptionKey="BDAAF7E00B69BA47B37EEAC328929A06A6647D4C89FED3A7D5C52B12B23680F4" validation="SHA1" decryption="AES"/>
        
        <authentication mode="Forms">
            <forms timeout="129600" name=".AUXBLOGENGINE" protection="All" slidingExpiration="true" loginUrl="~/login.aspx" cookieless="UseCookies"/>
        </authentication>
        
        <pages enableSessionState="false" enableViewStateMac="true" enableEventValidation="true">
            <controls>
                <add namespace="Controls" tagPrefix="blog"/>
            </controls>
        </pages>

        <customErrors mode="RemoteOnly" defaultRedirect="~/error404.aspx">
            <error statusCode="404" redirect="~/error404.aspx"/>
        </customErrors>
        
        <membership defaultProvider="XmlMembershipProvider">
            <providers>
                <clear/>
                <add name="XmlMembershipProvider" type="BlogEngine.Core.Providers.XmlMembershipProvider, BlogEngine.Core" description="XML membership provider" passwordFormat="Hashed"/>
                <add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="BlogEngine" applicationName="BlogEngine"/>
                <add name="DbMembershipProvider" type="BlogEngine.Core.Providers.DbMembershipProvider, BlogEngine.Core" passwordFormat="Hashed" connectionStringName="BlogEngine"/>
            </providers>
        </membership>
        
        <roleManager defaultProvider="XmlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
            <providers>
                <clear/>
                <add name="XmlRoleProvider" type="BlogEngine.Core.Providers.XmlRoleProvider, BlogEngine.Core" description="XML role provider"/>
                <add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="BlogEngine" applicationName="BlogEngine"/>
                <add name="DbRoleProvider" type="BlogEngine.Core.Providers.DbRoleProvider, BlogEngine.Core" connectionStringName="BlogEngine"/>
            </providers>
        </roleManager>
        
        <siteMap defaultProvider="PageSiteMap" enabled="true">
            <providers>
                <add name="PageSiteMap" description="The site map provider that reads in the .sitemap XML files." type="BlogEngine.Core.Web.Controls.PageSiteMap, BlogEngine.Core"/>
                <add name="SecuritySiteMap" description="Used for authenticated users." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" securityTrimmingEnabled="true" siteMapFile="Web.sitemap"/>
            </providers>
        </siteMap>
        
    </system.web>
    
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        
        <modules>
            <add name="WwwSubDomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubDomainModule, BlogEngine.Core"/>
            <add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite, BlogEngine.Core"/>
            <add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule, BlogEngine.Core"/>
            <add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule, BlogEngine.Core"/>
        </modules>
    
        <handlers accessPolicy="Read, Write, Script, Execute">
            <add name="FileHandler" verb="*" path="file.axd" type="BlogEngine.Core.Web.HttpHandlers.FileHandler, BlogEngine.Core"/>
            <add name="ImageHandler" verb="*" path="image.axd" type="BlogEngine.Core.Web.HttpHandlers.ImageHandler, BlogEngine.Core"/>
            <add name="Syndication" verb="*" path="syndication.axd" type="BlogEngine.Core.Web.HttpHandlers.SyndicationHandler, BlogEngine.Core"/>
            <add name="Sitemap" verb="*" path="sitemap.axd" type="BlogEngine.Core.Web.HttpHandlers.SiteMap, BlogEngine.Core"/>
            <add name="Trackback" verb="*" path="trackback.axd" type="BlogEngine.Core.Web.HttpHandlers.TrackbackHandler, BlogEngine.Core"/>
            <add name="Pingback" verb="*" path="pingback.axd" type="BlogEngine.Core.Web.HttpHandlers.PingbackHandler, BlogEngine.Core"/>
            <add name="OpenSearch" verb="*" path="opensearch.axd" type="BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler, BlogEngine.Core"/>
            <add name="MetaWeblog" verb="*" path="metaweblog.axd" type="BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler, BlogEngine.Core"/>
            <add name="RSD" verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler, BlogEngine.Core"/>
            <add name="CssHandler" verb="*" path="css.axd" type="BlogEngine.Core.Web.HttpHandlers.CssHandler, BlogEngine.Core"/>
            <add name="Javascript" verb="*" path="js.axd" type="BlogEngine.Core.Web.HttpHandlers.JavaScriptHandler, BlogEngine.Core"/>
            <add name="Rating" verb="*" path="rating.axd" type="BlogEngine.Core.Web.HttpHandlers.RatingHandler, BlogEngine.Core"/>
            <add name="Opml" verb="*" path="opml.axd" type="BlogEngine.Core.Web.HttpHandlers.OpmlHandler, BlogEngine.Core"/>
            <add name="BlogML" verb="*" path="blogml.axd" type="BlogEngine.Core.Web.HttpHandlers.BlogMLExportHandler, BlogEngine.Core"/>
            <add name="SIOC" verb="*" path="sioc.axd" type="BlogEngine.Core.Web.HttpHandlers.Sioc, BlogEngine.Core"/>
            <add name="Apml" verb="*" path="apml.axd" type="BlogEngine.Core.Web.HttpHandlers.Apml, BlogEngine.Core"/>
            <add name="Foaf" verb="*" path="foaf*.axd" type="BlogEngine.Core.Web.HttpHandlers.Foaf, BlogEngine.Core"/>
        </handlers>
    </system.webServer>

</configuration>
Coordinator
Feb 19, 2009 at 7:15 PM
So I just now took a look again and saw the error.htm image you posted.  This 500.19 error occurred on your local machine, and not on the live server, right?

The error message in the screenshot says "Cannot read configuration due to insufficient permissions".  This makes some sense just because IIS doesn't have as much control of folders outside the wwwroot folder.  Looking at the screenshot, it looks like on your local machine, the BlogEngine.web folder is located under C:\Users\Administrator\Documents\My Web Sites\BlogEngine.Web.

On your local machine, you could try moving the BlogEngine.web folder underneath the wwwroot folder where IIS has more control.

Or, before moving the folder, you could try setting the correct permissions.  If you pull up Windows Explorer and navigate to the C:\Users\Administrator\Documents\My Web Sites\BlogEngine.Web folder, right-click -> Properties and go to the Security tab.  This part's a little tricky, because I never know exactly which account to give permissions to.  I would try giving permissions to IIS_IUSRS and maybe any other IUSR_****** account.  I think you can safely give "Full control" permissions to these accounts (especially on your local machine).
Coordinator
Feb 19, 2009 at 8:22 PM
Also, btw, I'm getting 404 errors trying to get to your live server.  These look like plain old 404 errors that are caused when a file can't be found.  I could be wrong, but it doesn't appear that your blog application is setup correctly in IIS7.  You should have a "blog" application in IIS7, under "Default Web Site".  The structure should look like:

  Sites
     Default Web Site
         blog

Then, if you were to click on "blog", on the far right side, there will be a "Basic Settings..." link.  If you click on that, an "Edit Application" dialog window should come up.  The main fields on the dialog will be Alias, Application Pool and Physical Path.  And the Physical Path should be pointing to where your blog folder is.
Feb 19, 2009 at 10:04 PM

Hi Ben,

Sorry in delay for this answer, but today was a busy day...

Well, I changed the permissions in folder as suggested, and recreate the Blog application, and, voila…  Everything is working just great.   Please, take a look again: http://200.157.23.252/blog.

 

I can´t say how much I appreciate your help, and I mean it!

 

 

Have a nice holidays…oh! Here in Brazil, tomorrow start the Carnival!

Hope to hear from you soon,

Best regards.
Ricardo

Coordinator
Feb 19, 2009 at 10:31 PM
Wow, thanks for the great news Ricardo.  I thought we'd be doing an all nighter today to get it worked out :)

Yes, I can pull up your blog now and see your most recent post ... thanks!
Coordinator
Feb 19, 2009 at 10:40 PM
Edited Feb 19, 2009 at 11:00 PM
Btw, are you able to click on any of the Post titles to bring up a post?  I'm getting 404 errors trying to do that :(  Here's an example URL:

http://200.157.23.252/Blog/post/Post-inicial.aspx

I'm also seeing a 404 for the Javascript handler on your blog's homepage.

http://200.157.23.252/Blog/js.axd?path=%2fBlog%2fblog.js&v=1.4.5.0

EDIT:  Better skip what I say here and look at my next post instead.

These URLs are "virtual urls" where the page/file doesn't physically exist.  My first guess where the problem would be is an IIS7 setting.  If you go into IIS7, select your blog application, and then you'll see a bunch of icons in the middle of IIS7.  Look for "Handler Mappings".  Double click on Handler Mappings.  You'll then see a lot of handler mappings.  There will be a couple of different handlers for ASPX.  Look for *.aspx in the "Path" column.  When you find those, double click on each one which will bring up an "Edit Script Map" dialog window.  There should be a "Request Restrictions..." button.  Click that button.  On the Mapping tab, if the "Invoke handler only if request is mapped to" box is checked, then uncheck it.

You'll want to do this for both of the *.aspx handlers and also for the *.axd handler -- so 3 handlers all together.

When you make these changes, IIS7 will actually be updating your web.config file ... which is fine, I just wanted to make you aware of that.
Coordinator
Feb 19, 2009 at 11:00 PM
Edited Feb 19, 2009 at 11:16 PM
Actually, on second thought, there are some other AXD handlers that may need this done to them too.  Instead of making those changes in IIS7 I just suggested, it might be more efficient if you try replacing the <system.webServer> section in your web.config file with the one below.

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    
    <modules>
        <add name="WwwSubDomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubDomainModule, BlogEngine.Core" />
        <add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite, BlogEngine.Core" />
        <add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule, BlogEngine.Core" />
        <add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule, BlogEngine.Core" />
    </modules>

    <handlers accessPolicy="Read, Write, Script, Execute">
        <remove name="PageHandlerFactory-Integrated" />
        <add name="FileHandler" verb="*" path="file.axd" type="BlogEngine.Core.Web.HttpHandlers.FileHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="ImageHandler" verb="*" path="image.axd" type="BlogEngine.Core.Web.HttpHandlers.ImageHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="Syndication" verb="*" path="syndication.axd" type="BlogEngine.Core.Web.HttpHandlers.SyndicationHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="Sitemap" verb="*" path="sitemap.axd" type="BlogEngine.Core.Web.HttpHandlers.SiteMap, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="Trackback" verb="*" path="trackback.axd" type="BlogEngine.Core.Web.HttpHandlers.TrackbackHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="Pingback" verb="*" path="pingback.axd" type="BlogEngine.Core.Web.HttpHandlers.PingbackHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="OpenSearch" verb="*" path="opensearch.axd" type="BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="MetaWeblog" verb="*" path="metaweblog.axd" type="BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="RSD" verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="CssHandler" verb="*" path="css.axd" type="BlogEngine.Core.Web.HttpHandlers.CssHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="Javascript" path="js.axd" verb="*" type="BlogEngine.Core.Web.HttpHandlers.JavaScriptHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="Rating" verb="*" path="rating.axd" type="BlogEngine.Core.Web.HttpHandlers.RatingHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="Opml" verb="*" path="opml.axd" type="BlogEngine.Core.Web.HttpHandlers.OpmlHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="BlogML" verb="*" path="blogml.axd" type="BlogEngine.Core.Web.HttpHandlers.BlogMLExportHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="SIOC" verb="*" path="sioc.axd" type="BlogEngine.Core.Web.HttpHandlers.Sioc, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="Apml" verb="*" path="apml.axd" type="BlogEngine.Core.Web.HttpHandlers.Apml, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="Foaf" verb="*" path="foaf*.axd" type="BlogEngine.Core.Web.HttpHandlers.Foaf, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
        <add name="PageHandlerFactory-Integrated" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" />
    </handlers>
</system.webServer>
Feb 19, 2009 at 11:39 PM

Hi Ben,
You got me...
I already had noticed that, but think in doing this later night.

So, now that you are still with me, after dinner I will made this changes and let you know.

Just one thing, to be sure: you are talking about the ‘web.config’ inside the BlogEngine.net folder, is that right?

I just checked the handlers that you mention about, and none of them had that box checked.

Thanks in advance,
Ricardo

Coordinator
Feb 19, 2009 at 11:50 PM
Yes, I mean the web.config file in the root of your blog (the BlogEngine.web folder).

If none of them were checked in IIS7, then I can't say for sure if replacing your <system.webServer> section with the one above will work ... but hopefully it will.

If it doesn't work, please let me know ...
Feb 20, 2009 at 12:26 AM

Hi Ben,
I made the changes in “blogengine.net\web.config”.

There are errors, please see it here: http://200.157.23.252/error.htm

I tested to roll back the original one, and blog shows up.

 

I notice that after all the changes that I made in IIS7, the “default web site” icon now has a question mark, and some of the protocols are set to “unknown”.   Should be possible that you know what happened?

Thanks,
Ricardo

Coordinator
Feb 20, 2009 at 12:34 AM
It looks like when you were editing your web.config file, some of it got accidently deleted or modified.  I'm posting the entire web.config file below, which includes the changes I suggested a little earlier.  See if this one works.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <configSections>
        <sectionGroup name="BlogEngine">
            <section name="blogProvider" requirePermission="false" type="BlogEngine.Core.Providers.BlogProviderSection, BlogEngine.Core" allowDefinition="MachineToApplication" restartOnExternalChanges="true" />
        </sectionGroup>
    </configSections>
    <BlogEngine>
        <blogProvider defaultProvider="XmlBlogProvider">
            <providers>
                <add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core" />
                <add name="DbBlogProvider" type="BlogEngine.Core.Providers.DbBlogProvider, BlogEngine.Core" connectionStringName="BlogEngine" />
            </providers>
        </blogProvider>
    </BlogEngine>
    <!-- configSource is not implemented in Mono.
    <connectionStrings configSource="sql.config" />
  -->
    <connectionStrings>
        <clear />
        <add name="LocalSqlServer" connectionString="dummy" />
        <!-- Mono complains if LocalSqlServer isn't specified -->
        <add name="BlogEngine" connectionString="Data Source=MySQLServer;User ID=user;Password=password;persist security info=False;initial catalog=BlogEngine;" providerName="System.Data.SqlClient" />
    </connectionStrings>
    
    <appSettings>
        <add key="BlogEngine.FileExtension" value=".aspx" />
        <!-- You can e.g. use "~/blog/" if BlogEngine.NET is not located in the root of the application -->
        <add key="BlogEngine.VirtualPath" value="~/" />
        <!-- The regex used to identify mobile devices so a different theme can be shown -->
        <add key="BlogEngine.MobileDevices" value="(nokia|sonyericsson|blackberry|samsung|sec\-|windows ce|motorola|mot\-|up.b|midp\-)" />
        <!-- The name of the role with administrator permissions -->
        <add key="BlogEngine.AdminRole" value="Administrators" />
        <!--This value is to provide an alterantive location for storing data.-->
        <add key="StorageLocation" value="~/App_Data/" />
        <!--A comma separated list of script names to hard minify. It's case-sensitive. -->
        <add key="BlogEngine.HardMinify" value="blog.js,widget.js,WebResource.axd" />
    </appSettings>
    
    <system.web>
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            </assemblies>
        </compilation>
        
        <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="auto" uiCulture="auto" />
        <httpRuntime enableVersionHeader="false" useFullyQualifiedRedirectUrl="true" maxRequestLength="16384" executionTimeout="3600" requestLengthDiskThreshold="16384" />
        <machineKey validationKey="D9F7287EFDE8DF4CAFF79011D5308643D8F62AE10CDF30DAB640B7399BF6C57B0269D60A23FBCCC736FC2487ED695512BA95044DE4C58DC02C2BA0C4A266454C" decryptionKey="BDAAF7E00B69BA47B37EEAC328929A06A6647D4C89FED3A7D5C52B12B23680F4" validation="SHA1" decryption="AES" />
        
        <authentication mode="Forms">
            <forms timeout="129600" name=".AUXBLOGENGINE" protection="All" slidingExpiration="true" loginUrl="~/login.aspx" cookieless="UseCookies" />
        </authentication>
        
        <pages enableSessionState="false" enableViewStateMac="true" enableEventValidation="true">
            <controls>
                <add namespace="Controls" tagPrefix="blog" />
            </controls>
        </pages>

        <customErrors mode="RemoteOnly" defaultRedirect="~/error404.aspx">
            <error statusCode="404" redirect="~/error404.aspx" />
        </customErrors>
        
        <membership defaultProvider="XmlMembershipProvider">
            <providers>
                <clear />
                <add name="XmlMembershipProvider" type="BlogEngine.Core.Providers.XmlMembershipProvider, BlogEngine.Core" description="XML membership provider" passwordFormat="Hashed" />
                <add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="BlogEngine" applicationName="BlogEngine" />
                <add name="DbMembershipProvider" type="BlogEngine.Core.Providers.DbMembershipProvider, BlogEngine.Core" passwordFormat="Hashed" connectionStringName="BlogEngine" />
            </providers>
        </membership>
        
        <roleManager defaultProvider="XmlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
            <providers>
                <clear />
                <add name="XmlRoleProvider" type="BlogEngine.Core.Providers.XmlRoleProvider, BlogEngine.Core" description="XML role provider" />
                <add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="BlogEngine" applicationName="BlogEngine" />
                <add name="DbRoleProvider" type="BlogEngine.Core.Providers.DbRoleProvider, BlogEngine.Core" connectionStringName="BlogEngine" />
            </providers>
        </roleManager>
        
        <siteMap defaultProvider="PageSiteMap" enabled="true">
            <providers>
                <add name="PageSiteMap" description="The site map provider that reads in the .sitemap XML files." type="BlogEngine.Core.Web.Controls.PageSiteMap, BlogEngine.Core" />
                <add name="SecuritySiteMap" description="Used for authenticated users." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" securityTrimmingEnabled="true" siteMapFile="Web.sitemap" />
            </providers>
        </siteMap>
        
        <httpModules>
            <add name="WwwSubDomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubDomainModule, BlogEngine.Core" />
            <add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite, BlogEngine.Core" />
            <add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule, BlogEngine.Core" />
            <add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule, BlogEngine.Core" />
            <!--Remove the default ASP.NET modules we don't need-->
            <remove name="PassportAuthentication" />
            <remove name="Profile" />
            <remove name="AnonymousIdentification" />
        </httpModules>
        
        <httpHandlers>
            <add verb="*" path="file.axd" type="BlogEngine.Core.Web.HttpHandlers.FileHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="image.axd" type="BlogEngine.Core.Web.HttpHandlers.ImageHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="syndication.axd" type="BlogEngine.Core.Web.HttpHandlers.SyndicationHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="sitemap.axd" type="BlogEngine.Core.Web.HttpHandlers.SiteMap, BlogEngine.Core" validate="false" />
            <add verb="*" path="trackback.axd" type="BlogEngine.Core.Web.HttpHandlers.TrackbackHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="pingback.axd" type="BlogEngine.Core.Web.HttpHandlers.PingbackHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="opensearch.axd" type="BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="metaweblog.axd" type="BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="css.axd" type="BlogEngine.Core.Web.HttpHandlers.CssHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="js.axd" type="BlogEngine.Core.Web.HttpHandlers.JavaScriptHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="rating.axd" type="BlogEngine.Core.Web.HttpHandlers.RatingHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="opml.axd" type="BlogEngine.Core.Web.HttpHandlers.OpmlHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="blogml.axd" type="BlogEngine.Core.Web.HttpHandlers.BlogMLExportHandler, BlogEngine.Core" validate="false" />
            <add verb="*" path="sioc.axd" type="BlogEngine.Core.Web.HttpHandlers.Sioc, BlogEngine.Core" validate="false" />
            <add verb="*" path="apml.axd" type="BlogEngine.Core.Web.HttpHandlers.Apml, BlogEngine.Core" validate="false" />
            <add verb="*" path="foaf*.axd" type="BlogEngine.Core.Web.HttpHandlers.Foaf, BlogEngine.Core" validate="false" />
        </httpHandlers>
    </system.web>
    
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        
        <modules>
            <add name="WwwSubDomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubDomainModule, BlogEngine.Core" />
            <add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite, BlogEngine.Core" />
            <add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule, BlogEngine.Core" />
            <add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule, BlogEngine.Core" />
        </modules>
    
        <handlers accessPolicy="Read, Write, Script, Execute">
            <remove name="PageHandlerFactory-Integrated" />
            <add name="FileHandler" verb="*" path="file.axd" type="BlogEngine.Core.Web.HttpHandlers.FileHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="ImageHandler" verb="*" path="image.axd" type="BlogEngine.Core.Web.HttpHandlers.ImageHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="Syndication" verb="*" path="syndication.axd" type="BlogEngine.Core.Web.HttpHandlers.SyndicationHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="Sitemap" verb="*" path="sitemap.axd" type="BlogEngine.Core.Web.HttpHandlers.SiteMap, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="Trackback" verb="*" path="trackback.axd" type="BlogEngine.Core.Web.HttpHandlers.TrackbackHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="Pingback" verb="*" path="pingback.axd" type="BlogEngine.Core.Web.HttpHandlers.PingbackHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="OpenSearch" verb="*" path="opensearch.axd" type="BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="MetaWeblog" verb="*" path="metaweblog.axd" type="BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="RSD" verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="CssHandler" verb="*" path="css.axd" type="BlogEngine.Core.Web.HttpHandlers.CssHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="Javascript" path="js.axd" verb="*" type="BlogEngine.Core.Web.HttpHandlers.JavaScriptHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="Rating" verb="*" path="rating.axd" type="BlogEngine.Core.Web.HttpHandlers.RatingHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="Opml" verb="*" path="opml.axd" type="BlogEngine.Core.Web.HttpHandlers.OpmlHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="BlogML" verb="*" path="blogml.axd" type="BlogEngine.Core.Web.HttpHandlers.BlogMLExportHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="SIOC" verb="*" path="sioc.axd" type="BlogEngine.Core.Web.HttpHandlers.Sioc, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="Apml" verb="*" path="apml.axd" type="BlogEngine.Core.Web.HttpHandlers.Apml, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="Foaf" verb="*" path="foaf*.axd" type="BlogEngine.Core.Web.HttpHandlers.Foaf, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" />
            <add name="PageHandlerFactory-Integrated" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" />
        </handlers>
    </system.webServer>

</configuration>

Feb 20, 2009 at 12:48 AM
Hi Ben,
Ok, it´s was my fault, and now it´s running back again.
Please, could you evaluate it? http://200.157.23.252/Blog/
Thanks,
Ricardo
Coordinator
Feb 20, 2009 at 1:18 AM
Your blog seems to be working very good now.  I can successfully click on any of the post titles, the js.axd file is working, the RSS "subscription" link is working now too.  I don't see any remaining problems.

I do see the words "blog do RSM" on the top left corner of all the pages.  That's coming from the Settings tab in the Control Panel.  Towards the bottom of the page, there's a section called "HTML head section".  I wasn't sure if you wanted those words to show on all the pages.

Otherwise, it's looking good.
Feb 20, 2009 at 1:23 AM

Hi Ben,

Nice, thanks to you.   About the heads, just testing.

 

I would like to make a conceptual question:

If I want now to make my “blog2”, what have to be made?   Just another app in “default web”?

How is handled the different blogs?  

Thanks n advance,

Ricardo

Coordinator
Feb 20, 2009 at 2:02 AM
It should be pretty easy at this point to create a second blog (now that we've got one blog working).

What you would do is make a copy of your current blog folder.  So you will have two folders with the same content.  You will probably need to set the permissions on this new folder like you did before with your original blog folder.

Then you just create a second application in IIS7.  So the structure in IIS7 would look like:

  Sites
     Default Web Site
         blog
         blog2

When you create the "blog2" application in IIS7, just make sure the Physical Path is pointing to the new folder you made a copy of.

That should be all that is required.  You can then modify the files in blog2 to customize the blog.
Feb 24, 2009 at 12:06 AM

Hi Ben,
I´m back, again!

This weekend I upgrade my home computer to a new Intel E8400, and I´m very happy.
I try to copy and paste my test blog, but I´m getting the bellow error.

What kind of permission is it asking?   I have the regular one´s, IIS_IUSR and Network Services, and a few others.   It´s a brand new server 2008 install.

Hope you can give some help here.

Best regards,

Ricardo






HTTP Error 401.3 - Unauthorized

You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.

<fieldset><legend>Detailed Error Information</legend>
Module IIS Web Core
Notification AuthenticateRequest
Handler StaticFile
Error Code 0x80070005
Requested URL http://localhost:80/blog1
Physical Path D:\Users\Administrator\Documents\My Web Sites\BlogEngine.NET
Logon Method Anonymous
Logon User Anonymous
</fieldset>

Coordinator
Feb 24, 2009 at 12:15 AM
Edited Feb 24, 2009 at 12:15 AM
I would try a Google search, like maybe this one.

Here's one of the top results with some ideas you can try.

I would make sure you've given Full Control to the IIS_IUSR and Network Services accounts.  Also, in IIS7, if you select your blog application, in the middle, there's an icon for "Default Document".  Make sure "default.aspx" is in that list.

Congrats on the new computer, btw :)
Feb 24, 2009 at 2:11 AM

Hi Ben,
Sorry if I´m bordering you, but...
I´ve made something here: 
http://200.157.23.252/toben.htm, in hope that it could give some clue of what is happening.

I´ll appreciate any help you can give.
Thanks in advance,
Ricardo

Coordinator
Feb 24, 2009 at 2:21 AM
Hi.  For the Authorization warning you have in the Config error screenshot ... I wouldn't worry about that too much, because even on my local machine, I see that same warning, but everything else is running fine.

What happens if you try to access the default.aspx page directly?  E.G.

http://localhost/blog1/default.aspx

Does that work?

If it does, then you may need to just add "default.aspx" as a Default Document in IIS7.
Feb 24, 2009 at 2:49 AM
Hi,
Please, look here: http://200.157.23.252/toben2.htm

Shoul we start a new brand new post?
Ricardo
Feb 24, 2009 at 2:50 AM
Hi,
Please, look here: http://200.157.23.252/toben2.htm

Should we start a new brand new post?
Ricardo
Coordinator
Feb 24, 2009 at 3:15 AM
First, when you check the Default Document, on the left side of IIS7, make sure you have "Blog1" selected -- not "Default Web Site".

It looks like the blog is coming up, but your CSS file isn't being applied.  Are you using the same web.config file I posted in this Discussion last Thursday?

Also, is your "Blog1" application in the DefaultAppPool or the Classic .NET App Pool?

Lastly, I guess Blog1 isn't accessible through your public IP address?  I tried to get it to via http://200.157.23.252/Blog1/default.aspx, but that didn't work.  No big deal ... I was just wondering.
Feb 24, 2009 at 3:24 AM
Hi,
First: in "blog1" document there is ".aspx".
I just copy the same dir for the new machine (only difference is default drive: before was "c:\" now id "d:\").
Blog1 is "DefaultAppPool".
Blog1 is in the new machine, that still don´t have fixed IP: only after the Carnival!!!!!!!

I left the other machine (http://200...) on just to try making things the same, but, as you can see, it is a far crying till now.

Thanks,
Ricardo
Coordinator
Feb 24, 2009 at 3:32 AM
If you pull up that page again, http://localhost/Blog1/default.aspx, in Internet Explorer (IE), right-click and select 'View Source'.  You'll see the HTML source.  In the <head> section, you should see a <link> tag pointing to a CSS.AXD file.  The tag will look something like:

<link rel="stylesheet" href="/Blog1/themes/Standard/css.axd?name=style.css&amp;v=1.4.5.14" type="text/css" />

Once you find it, try navigating to the CSS.AXD file directly in your browser.  So, for the example above, the URL to navigate to would be:

http://localhost/Blog1/themes/Standard/css.axd?name=style.css&amp;v=1.4.5.14

(your URL will probably be a little different)

If it works correctly, then you should see CSS styles in your browser.  If it doesn't work, you'll get some error message.
Coordinator
Feb 24, 2009 at 3:43 AM
Actually, I pulled up your old blog, and you don't have a <link> tag for CSS.AXD.  Instead you have a <link> tag directly to the style.css file.

<link rel="stylesheet" href="themes/StableStart/style.css" type="text/css" />

So, on your new machine, if you also see this same <link> tag when doing a View Source, try navigating directly to the style.css file in your browser:

http://localhost/blog1/themes/StableStart/style.css
Feb 24, 2009 at 4:11 AM
HI,
Ok that´s it.
<link rel="stylesheet" href="themes/StableStart/style.css" type="text/css" />

And when I try to navigate to it, error is 404.0 - not found.
I just double check, and the file is there.

Right now, I´m searching about permissions, and similar stuff.

Ricardo
Feb 24, 2009 at 12:48 PM
Good Morning Ben,
I found the solution for the 401.3 authorization error, you can see it here: http://200.157.23.252/toben3.htm

Thanks for all your support.
Best regards,
Ricardo.

For credits, here:
http://www.bloggingdeveloper.com/post/HTTP-Error-4013---Unauthorized-Error---While-creating-IIS-70-web-site-on-Windows-Vista.aspx
Coordinator
Feb 24, 2009 at 5:15 PM
Terrific!  Thanks for sharing the solution.