Member 8351861
Вот мой файл web.config, дайте мне знать, если все в порядке. Я новичок в этом деле ASP.NET и C#, мне действительно нужна помощь. Могу я выставить все коды, если это поможет?
<?xml version="1.0" encoding="UTF-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</configSections>
<rewriter>
<!-- Rewrite department pages -->
<rewrite url="^.*-d([0-9]+)/?$" to="~/Catalog.aspx?DepartmentID=$1" processing="stop" />
<rewrite url="^.*-d([0-9]+)/page-([0-9]+)/?$" to="~/Catalog.aspx?DepartmentID=$1&Page=$2" processing="stop" />
<!-- Rewrite category pages -->
<rewrite url="^.*-d([0-9]+)/.*-c([0-9]+)/?$" to="~/Catalog.aspx?DepartmentId=$1&CategoryId=$2" processing="stop" />
<rewrite url="^.*-d([0-9]+)/.*-c([0-9]+)/page-([0-9]+)/?$" to="~/Catalog.aspx?DepartmentId=$1&CategoryId=$2&Page=$3" processing="stop" />
<!-- Rewrite product details pages -->
<rewrite url="^.*-p([0-9]+)/?$" to="~/Product.aspx?ProductId=$1" processing="stop" />
</rewriter>
<appSettings>
<add key="PaypalUrl" value="https://www.paypal.com/xclick" />
<add key="PaypalEmail" value="Test@example.com" />
<add key="PaypalCurrency" value="USD" />
<add key="PaypalReturnUrl" value="http://www.poshanddangles.com" />
<add key="PaypalCancelUrl" value="http://www.poshanddangles.com" />
<add key="MailServer" value="mail server address" />
<add key="MailUsername" value="mail username " />
<add key="MailPassword" value="mail password" />
<add key="MailFrom" value="mail address" />
<add key="EnableErrorLogEmail" value="false" />
<add key="ErrorLogEmail" value="errors@example.com" />
<add key="ProductsPerPage" value="6" />
<add key="ProductDescriptionLength" value="60" />
<add key="SiteName" value="PoshandDangles" />
<add key="CartPersistDays" value="10" />
</appSettings>
<connectionStrings>
<add name="PoshandDanglesConnection" connectionString="Server=(local)\SqlExpress; Database=PoshandDangles; Integrated Security=SSPI" providerName="System.Data.SqlClient" />
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Server=(local)\SqlExpress;Database=PoshandDangles; Integrated Security=SSPI" providerName="System.Data.SqlClient" />
</connectionStrings>
<location path="AdminDepartments.aspx">
<system.web>
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>
<location path="AdminCategories.aspx">
<system.web>
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>
<location path="AdminProducts.aspx">
<system.web>
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>
<location path="AdminProductDetails.aspx">
<system.web>
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>
<location path="AdminProductAttributes.aspx">
<system.web>
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>
<!-- Only administrators are allowed to access ShoppingCartAdmin.aspx -->
<location path="AdminShoppingCart.aspx">
<system.web>
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>
<!-- Only administrators are allowed to access AdminOrders.aspx -->
<location path="AdminOrders.aspx">
<system.web>
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>
<!-- Only administrators are allowed to access AdminOrders.aspx -->
<location path="AdminOrderDetails.aspx">
<system.web>
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>
<system.web>
<webServices>
<protocols>
<add name="HttpPost" />
</protocols>
</webServices>
<roleManager enabled="true" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-US" />
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" targetFramework="4.0" />
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms">
<forms name="PoshandDanglesLogin" loginUrl="Login.aspx" path="/" protection="All" timeout="60" />
</authentication>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<customErrors mode="Off" defaultRedirect="~/Oops.aspx">
<error statusCode="404" redirect="~/NotFound.aspx" />
<error statusCode="500" redirect="~/Oops.aspx" />
</customErrors>
<pages theme="PoshandDanglesDefault" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
<httpModules>
<add type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" name="UrlRewriter" />
</httpModules>
</system.web>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" />
</modules>
<handlers>
<remove name="PageHandlerFactory-ISAPI-4.0_32bit" />
<add name="PageHandlerFactory-ISAPI-4.0_32bit" path=".aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
</handlers>
</system.webServer>
</configuration>