I want to disable the automatic friendly URL browsing in visual studio when I load a page.
Most of the answers that I've read say that I should comment out the following line in RouteConfig.cs.
routes.EnableFriendlyUrls(settings);
I did this when I load the page (browse with) in Visual Studio 2013, it still loads it as Friendly URL and throws 404 error. I am running a web form project in C#. Using IIS Express within Visual Studio to run the site.
How can I disable the friendly URL so it will load my browser.aspx page correctly?
The problem was that the 301 redirection was cached. After deleting the cache it worked. (thanks to mason for providing a hint to check the network traffic).
Related
I'm running Win 10, VS Express for Web 2015. I have an existing asp.net membership database that I want to amend using the Web Site Administration Tool.
I followed this hack to manually start the Web Site Administration Tool via the IIS: Visual Studio 2013 and ASP.NET Web Configuration Tool
The Web Site Administration Tool launches fine. However, when I go to the security tab, I get the following error message: Access to the path 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\19aec8c6\ee1f4195\hash' is denied.
I've gone into the Temporary ASP.Net files folder and changed the properties for my userid to give me full control, yet I continue to run up against the same error.
Update: I turned on the IIS in the Windows Feature and that seemed to make some progress. Now when I run the Web Site Administration Tool, I get a different error when I click on the security tab: Access to the path 'C:\Users\XXXX\AppData\Local\Temp\Temporary ASP.NET Files\root\19aec8c6\ee1f4195\hash' is denied.
Any suggestions?
Did you notice the update left on the referenced answer;
IMPORTANT EDIT: I am sorry, I just realized that it matters if you start console with administrator priviledges. Don't do that. If console has administrator rights, the Web Configuration Tool shows this error on the Security page:
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store. The following message may help in diagnosing the problem: Access to the path 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1c3fef5c\2180c7f9\hash' is denied.
Looks like the same issue.
Just Change TEMP location to "C:\Windows\Temp" and restart Visual Studio
If you wish, you can reset TEMP location to "%USERPROFILE%\AppData\Local\Temp" after work fine.
I have a localhost install of DotNetNuke 6.2.6 with a custom module.
The problem is that any images or css contained in the module.css file does not load. Firebug reports an 500 Internal Server error when retrieving the images or the module.css files.
My image tag is:
"< asp:Image ID="DeleteButton" ImageUrl="~/DesktopModules/PositionsManagement/images/delete.gif" runat="server" / >"
The web browser displays a broken image icon whose properties point to
http://localhost/dotnetnuke/DesktopModules/PositionsManagement/images/delete.gif
When I try to navigate to the above link I get hit with the following error message:
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the element of the Web.config file.
And when I remove the targetframework attribute like it suggests I get this:
*Parser Error Message: The code subdirectory '/dotnetnuke/DesktopModules/PositionsManagement/App_Code/RazorHelpers/' does not exist.*
Does anyone know what the problem is or how I get the RazorHelpers content it seems to be wanting?
Take a look in IIS Manager.
I got this error and resolved it by deleting the application created on the folder of the module in error.
I don't know why this folder was converted in application.
Seems DNN doesn't play nice with Windows 8, Visual Studio 2012 and SQL Server 2012. Whether it's Win8, or some combination of all of them, I have no idea.
I rectified the problem by creating a Windows 7 virtual Machine.
EDIT: With some local assistance, it seems that deleting the modules web.config file and cleaning up my Web APplications in the App Pool helped. (I had it in there twice somehow, at localhost/dotnetnuke/etc and localhost/dnn/etc. After cleaning up and deleting the web.config it started working again.
I am trying to create a webservice in c# that can be called from jquery.
I have created the webservice in visual studio and it works when I press F5, but when I try to upload it I get different results. I'm even publishing though VS straight to FTP yet when viewing the page I get this
<%# WebService Language="C#" CodeBehind="Service1.asmx.cs" Class="WebService1.Service1" %>
This is the same message I am getting returned to my jquery when requesting a get. Any ideas why it isn't working?
Make sure the virtual path in IIS is defined as an Application. Look here for more info:
http://technet.microsoft.com/en-us/library/cc772042(WS.10).aspx
I got this error (after what I think was due to rebinding - through Add Service Reference - to a web service in a new version of Visual Studio). I noticed I had ended up with duplicate .asmx files. Try deleting the .asmx files and rebind to the web service from scratch through Add Service Reference in Visual Studio Solution Explorer
I'm using Visual Studio 2008. I have created a project with asp.net Mvc 2 and C#. The project have a login page and followed by few pages. Its running correctly on my local machine. I'm publishing it on the server and when I click Login button it is not redirecting to next page and the url is not recognized.
The button url path is "/Data/Validatelogin/".I have tried IIS 6 and IIS 7.5. but no results.
here "data" is the "controller" and "Validatelogin" is a function. my view name is "Login". here the IIS confuses about the routing. after login i have redirected to ("Home","Index"). but it shows error on validation itself.
The browser error Shows : HTTP Error 404 - File or directory not found. The requested page "/Data/Validatelogin/" not found. Internet Information Services (IIS)
My guess is that you used Visual Studio's web server to test directly (the default one). In this case, your application is hosted at the root of the web server, e.g. http://localhost:51234/Data/ValidateLogin.
You've now deployed your solution to IIS, and it's probably sitting in http://someserver/someapplication/. When you redirect to "Data/ValidateLogin", it goes to http://someserver/Data/ValidateLogin, instead of http://someserver/someapplication/Data/ValidateLogin.
Solution - try add "~/" to the start of the path when you redirect.
Try these:
Can't run ASP.NET MVC 2 web app on IIS 7.5
or on iis6
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
How can I validate that my ASPNET AJAX installation is correct.
I have Visual Studio 2008 and had never previously installed any AJAX version.
My UpdatePanel is nto working within IIS6, although it works ok within Visual Studio's web server. The behaviour I get is as if the UpdatePanel doesnt exist at all - i.e. it reverts back to 'normal' ASPX type behavior.
I tried installing AJAX from MSDN followed by an IISRESET yet still it is still not working properly.
What can I check to diagnose the problem?
Update: When running within Visual Studio (Cassini) I get the following 3 requests shown in Fiddler:
http://localhost:1105/RRStatistics/WebResource.axd?d=k5J0oI4tNNc1xbK-2DAgZg2&t=633564733834698722
http://localhost:1105/RRStatistics/ScriptResource.axd?d=N8BdmNpXVve13PiOuRcss0GMKpoTBFsi7UcScm-WmXE9jw5qOijeLDcIyiOsSQZ4k3shu0R2ly5WhH2vI_IbNVcTbxej1dkbdYFXrN6c7Qw1&t=ffffffff867086f6
http://localhost:1105/RRStatistics/ScriptResource.axd?d=N8BdmNpXVve13PiOuRcss0GMKpoTBFsi7UcScm-WmXE9jw5qOijeLDcIyiOsSQZ4AsqNeJVXGSf6sCcCp1QK0jdKTlbRqIN1LFVP8w6R0lJ_vbk-CfopYINgjYsHpWfP0&t=ffffffff867086f6
but when I run within IIS i only get this single request :
http://www.example.com/RRStatistics/ScriptResource.axd?d=f_uL3BYT2usKhP7VtSYNUxxYRLVrX5rhnXUonvvzSEIc1qA5dLOlcdNr9xlkSQcnZKyBHj1nI523o9DjxNr45hRpHF7xxC5WlhImxu9TALw1&t=ffffffff867086f6
Now the second request in Cassini contains a javascript file with 'partial rendering' as one of the first comments. I'm sure this is the source of the problem, but I cannot figure out why in IIS i dont get the other requests.
Check for any JavaScript errors. Sometimes the JavaScript required for the UpdatePanel to work fails to load.
Haven't tried this myself, but I found several forum postings recommending the following
Try and add the following to your
web.config
within
<system.webServer><handlers>
<add verb="GET"
path="ScriptResource.axd"
type="Microsoft.Web.Handlers.ScriptResourceHandler"
validate="false" />
Another option would be to check your web.config. You could for example create an new Ajax enabled ASP.NET website from Visual Studio. This will generate a correct web.config. Copy over all non-ajax sections from your existing web.config and you're set. This worked for me.
-Edoode