Implementation of blogEngine

Aug 6, 2007 at 1:41 PM
Edited Aug 6, 2007 at 2:18 PM
hi,
I'm a beginner and i really don't know how to implement this blogengine.
i'm working in C#.Net 2.0. i've created a new website folder named BLogEngine.NET.
i've inclded all the pages and folders of the project into this website folder but when i try to run it, this shows an error :
"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."

Coding:
<?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"/>
<add name="MSSQLBlogProvider" type="BlogEngine.Core.Providers.MSSQLBlogProvider"/>
</providers>
</blogProvider>
</BlogEngine>

<connectionStrings configSource="sql.config" />

<system.web>

<compilation debug="true" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
<httpRuntime enableVersionHeader="false" sendCacheControlHeader="true" />
<trust level="High" />

<machineKey
validationKey="D9F7287EFDE8DF4CAFF79011D5308643D8F62AE10CDF30DAB640B7399BF6C57B0269D60A23FBCCC736FC2487ED695512BA95044DE4C58DC02C2BA0C4A266454C"
decryptionKey="BDAAF7E00B69BA47B37EEAC328929A06A6647D4C89FED3A7D5C52B12B23680F4"
validation="SHA1" decryption="AES"
/>

<authentication mode="Forms">
<forms timeout="129600" name=".AUXBLOGENGINE" protection="All" slidingExpiration="true" loginUrl="~/login.aspx" />
</authentication>

<pages enableSessionState="false" enableViewStateMac="true" enableEventValidation="true">
<controls>
<add namespace="Controls" tagPrefix="blog"/>
</controls>
</pages>

<customErrors mode="RemoteOnly">
<error statusCode="404" redirect="~/error404.aspx" />
</customErrors>

<membership defaultProvider="XmlMembershipProvider">
<providers>
<clear />
<add name="XmlMembershipProvider" type="BlogEngine.Core.Providers.XmlMembershipProvider" description="XML membership provider" xmlFileName="~/App_Data/users.xml"/>
</providers>
</membership>

<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.PageSiteMap"/>
</providers>
</siteMap>

<httpModules>
<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"/>
<add name="WwwSubdomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubdomainModule"/>
</httpModules>

<httpHandlers>
<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"/>
<add verb="*" path="rating.axd" type="BlogEngine.Core.Web.HttpHandlers.RatingHandler" validate="false"/>
<add verb="*" path="opml.axd" type="BlogEngine.Core.Web.HttpHandlers.OpmlHandler" validate="false"/>
</httpHandlers>

</system.web>
</configuration>


Can somebody Pls. tell me how to resolve it. Its urgent.

Thanks,
harryforums
Coordinator
Aug 6, 2007 at 2:37 PM
This is because you are running the website from the IIS and haven't made the blogengine folder an application. In IIS admin right-click the blogengine folder and write an application name. That makes it an application and it will run fine.
Aug 7, 2007 at 11:21 AM
Edited Aug 7, 2007 at 11:27 AM
hi,

Thanks for your help.
Another question as we are running this as an application can we embed this code in our website project which is in asp.net 2.0 with c sharp and if yes can you guide us with the procedure
now that previous error is removed but some new errors arised. Few of the them are listed below. Can you please provide your help for these also:
I've included "DotNetSlave.BusinessLogic" folder in this application.

Error 1 The type or namespace name 'BlogEngine' could not be found (are you missing a using directive or an assembly reference?) C:\Inetpub\wwwroot\BlogEngine.NET\App_Code\Controls\CategoryList.cs 9 7 C:\...\BlogEngine.NET\

Error 2 The type or namespace name 'BlogEngine' could not be found (are you missing a using directive or an assembly reference?) C:\Inetpub\wwwroot\BlogEngine.NET\App_Code\Controls\PostCalendar.cs 10 7 C:\...\BlogEngine.NET\

Error 3 The type or namespace name 'BlogEngine' could not be found (are you missing a using directive or an assembly reference?) C:\Inetpub\wwwroot\BlogEngine.NET\App_Code\Controls\SearchBox.cs 7 7 C:\...\BlogEngine.NET\

Error 4 The type or namespace name 'BlogEngine' could not be found (are you missing a using directive or an assembly reference?) C:\Inetpub\wwwroot\BlogEngine.NET\App_Code\Controls\RecentPosts.cs 8 7 C:\...\BlogEngine.NET\

Error 5 The type or namespace name 'BlogEngine' could not be found (are you missing a using directive or an assembly reference?) C:\Inetpub\wwwroot\BlogEngine.NET\App_Code\Controls\Blogroll.cs 15 7 C:\...\BlogEngine.NET\

Thanks,
harryforums.
Oct 15, 2007 at 10:51 AM
Edited Oct 15, 2007 at 11:03 AM
I have the same problem :(
It's sad that forumsharry hasn't shared his problem solution,
can anybody provide me with a solution for the problem named in the first post from forumsharry?

Thanks,
phew

Edit:
-Both,
the first project at: C:\Inetpub\wwwroot\project\
and
the blog engine at: C:\Inetpub\wwwroot\project\blog\
are configured as applications on my IIS

-The Blogengine itself runs on my IIS if it's not inside the Subdirectory of another Project
-Both, are C# .net 2.0 Projects

Edit2:
And btw yes it's urgent too.
So Thanks Deluxe if sobody could help me fast.
Oct 15, 2007 at 5:50 PM
forumsharry's second issue and phew - it looks like your using the source code download and the BlogEngine.Core.dll file isn't being compiled or is failing to compile.

Your IIS should be set up like this:
  • Create a virtual directory/application on the BlogEngine.Web folder.
  • Open the solution like you normally would, compile the entire solution and try it in your browser (you can't use the right-click "View in browser" because it will start the built-in ASP.NET engine)

You have a number of options after that when you're ready to move it to a production server.