Question

I've been working to get our site moved to a public beta server, and after we configured IIS to match the internal testing server I noticed this problem. The application still works but it has this ugly stuff on the end.

What is causing this to show? I've setup the ISAPI filter, and added a wildcard for aspnet_isapi.dll.

Update.

I completely deleted and recreated my website on my testing server to verify how the urls looked.

After recreating the site to match beta, my test server does not display any of the eurl.axd/gibberish in the url.

Here is a quick overview of the configuration

IIS6/ Windows 2003/Helicon Isapi rewrite running.

Website <--asp classic | Default App Pool | custom .htaccess file
|
|
+-----------dr405 <-- MVC3 application | .Net 4.0 App Pool

As far as I know. beta mirrors this exactly. However, let's say it did not. What variation could be causing the issue?

Since the site works on one server, and not the other, I would prefer not to have any solutions that involve modifying my application, editing my .htaccess file, etc...

Web.config system.web section

    <customErrors mode="Off"/>
    <httpRuntime maxRequestLength="1000000000" />
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
      <buildProviders>
        <add extension=".cshtml" type="System.Web.WebPages.Razor.RazorBuildProvider, System.Web.WebPages.Razor" />
      </buildProviders>
    </compilation>
    <authentication mode="Forms">
      <forms loginUrl="~/Account/LogOn" timeout="90000" />
    </authentication>
    <membership>
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
      </providers>
    </membership>
    <profile enabled="true" defaultProvider="dr405ProfileProvider" inherits="Tangible.Profiles.DR405Profile">
      <providers>
        <clear />
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
        <add name="dr405ProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
      </providers>
    </profile>
    <roleManager enabled="true">
      <providers>
        <clear />
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
      </providers>
    </roleManager>
    <pages>
      <namespaces>
        <add namespace="System.Web.Helpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.WebPages" />
        <add namespace="System.Data" />
      </namespaces>
    </pages>
  </system.web>

Update 2

Sorry if I confused anyone. I have a integrated testing server. that is not exposed to the public. The site works correctly there. The external facing beta server is where I'm having the problems. The production server is not even a factor in all of this yet.

Update 3

Here is my .htaccess file. I still do not believe this should require any modification since this file and the application function correctly on my integrated testing server.

Most of the files purpose is to fix some really ugly urls, and point users automatically to moved content. No rules are intended for the application that I am having issues with.

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} (www.sarasotaproperty.net|www.sc-pa.net|sc-pa.net|sarasotaproperty.net) [nc]
RewriteRule ^(.*)$ http://www.sc-pa.com/$1 [R=301,NC,QSA]

RewriteMap  lc int:tolower

RewriteCond %{REQUEST_URI} [A-Z]
RewriteCond %{REQUEST_URI} !.*(js|css|inc|jpg|gif|png)
RewriteRule (.*) ${lc:$1} [R=301]


RewriteCond %{REQUEST_URI} !.*(web_content/pdf/).*
RewriteCond %{SCRIPT_FILENAME} !-d   
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule (?!.*/web_content/pdf/)([^/]*?\.pdf) /web_content/pdf/$1 [R=301]

RewriteRule pasite-(.*\.asp)$  /content/$1 [R=301,QSA]
RewriteRule home\.asp$  / [R=301]

RewriteRule ^search/tpp/?$ content/search_tangible.asp 
RewriteRule ^search/?$ content/search_real_property.asp 
RewriteRule ^downloads/?$ content/downloads.asp
#RewriteRule ^(.*?view)/([^/]*)/([^/]*)(/.+)? /search/parcel_detail.asp?account=0&$2=$3 [NC,LP,QSA,R=301]
Était-ce utile?

La solution

When the virtual folders in IIS match those in the production server, it works as expected; however, you see the odd URL if the virtual folders are different?

It sounds as though the rewrite rules in .htaccess are specific to the production setup.

Would it be possible for you to make changes to helicon's httpd.conf/httpd.ini on the beta server so the rewrite rules work as expected? I'm not sure what the rule should look like and it's been a while since I worked with something similar. :/

Here's a doc on httpd.ini: http://www.isapirewrite.com/docs/#conffile

A thread that sounds very similar to your situation that might help point you in the right direction: http://www.helicontech.com/forum/15029-ASPNET_40_MVC_and_ISAPI_Rewrite_3.html

Once you've setup the rewrite rule in the httpd.conf, you might need to prevent the rules from .htaccess from running. I think AllowOverride None will make that happen. Here's an example:

<Directory "/parentFolder/dr405">
   AllowOverride None
</Directory>

My memory about httpd.conf and rewrites is sketchy at best. I hope this helps point you in the right direction.

EDIT

Have you tried the suggestions given in the answer here: https://stackoverflow.com/a/3327031/62054

It sounds very similar to the problem you're having.

Autres conseils

What version of session state are you using? It looks like session state information and it is set to cookieless.

What are the rules? Sometimes 'RewriteBase /' directive is the reason for different builds.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top