Hi Guys Here is my sub-domain website. As you can see it gives an error. I have contacted the support team, but they blamed it on my app. Here is what they said: The problem with the above is, that I haven't got ANY sort of URL Rewrite in my Web.Config. Here is the code from my web.config. Code: <?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=152368 --> <configuration> <connectionStrings> <add name="conString" /* ommitted */ /> </connectionStrings> <appSettings> <add key="ClientValidationEnabled" value="true"/> <add key="UnobtrusiveJavaScriptEnabled" value="true"/> </appSettings> <system.web> <customErrors mode="On" defaultRedirect="~/Errors/Generic"> <error statusCode="404" redirect="~/Errors/NotFound" /> <error statusCode="500" redirect="~/Errors/Internal" /> </customErrors> <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.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> </assemblies> </compilation> <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="2880" /> </authentication> <membership> <providers> <clear/> <add name="someMemb" type="System.Web.Security" connectionStringName="conString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> </providers> </membership> <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"/> </namespaces> </pages> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration> As you can see there isn't any URL Rewrite going on ! What can be causing the issue ? I personally think it is something wrong at the host's end, but then again I might be wrong. I await your responses. Thank You.
By the way, to get my Sub-Domain setup I have followed Ray's instructions: I'm a bit unsure about the {R:1} ! Is that suppose to go up with each Rule ? i.e. {R:2} and then {R:3} ..etc Or is it correct to always stay at {R:1} ? Thanks
Its best to disable the custom error handling. The custom error handling is misleading because it is showing that a file cannot be found where in fact the file that cannot be found is the custom error page it is trying to show. Disable your custom error handling for now and we can see the true error message. From there we can decide on what the next step will be.
Hi Ray Thank you for the suggestion. I turned off custom errors, and that lead me to the real error. I was missing the MVC Assembly. The site is now up and running. however there is a problem. Can you please visit the site and go to /account/modules That action is an Authorized action. Which means, you should be automatically redirected to the Login page. Instead I get these wrong URL: Code: http://suni.jzendev.com/suni/Account/LogOn?ReturnUrl=%2faccount%2fmodules I have this problem with my other domain too. Why is this happening ? as you can see the folder name [ suni ] is added into the url for some reason ! PS. This doesn't happen on my local machine.
It looks like its the redirect script that is causing the error. Look at your URL. http://suni.jzendev.com/account/module ...Now look at your error at the bottom, specifically this line... Requested URL: /suni/account/module Do you have the folder account/module under the folder suni. Try moving it there if you are going to change the redirect call to go to suni.
Hi Ray. Here is the folder structure: root/suni/{mvc app} I use { ftp://ftp.mysite.com/suni } for uploading my files. I right click on my site in VS 2010 and choose Publish then choose FTP from the drop down. So, Yes I do have a Controllers folder with the controller [ AccountController ] and inside that I have an Action called [ Modules ] Thanks
Could it have something to do with them instructions you gave me for the IIS Manager ? About setting up the Domain and Sub-Domain pointers ?
It may have something to do with your http bindings. Can you check on that and post it on this thread?
Hi Ray Erm ... Where do I check for HTTP Bindings ? I've not really touched anything ! I've kept all the defaults ! And I've never edited any HTTP Bindings I just follow MVC 3 Video Tutorials ( so far no mention of HTTP Bindings ). Can you tell me where I would find these ? Just to make sure it is clear: On my local machine all is working as expected. Thanks
UPDATE: Ray I found this post. The guy has the exact same Problem. He says all you need to do to make it work is: But I have done that, and it is complaining that them elements don't exist. I am using VS 2010 and .NET 4.0. UPDATE 2: I've found this as well, but that's something the Winhost staff have to do from their End. The more I research this, the more it appears that the problem is from Winhost's End. I need this to work urgently, Please help
The second suggestions was to update the Pipeline mode. You can do this yourself within your Winhost control panel Site Manager/Pipeline Mode. Set from Integrated to Classic if you need to.
Also as a quick test try setting wildcard mappings on your account. Try looking at this link. http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/