Unable to modify machine.config file - asp.net

I want to improve performance of my ASP.NET web application and want to change "processModel" tag in machine.config. But I am unable to modify "machine.config" file located at framework directory. Though I have disabled "readonly" permission for the file, still it is not working.

You need to run the text editor that you are using to edit the machine.config file as Administrator.

Open it using NotePad++ (or) NotePad. You have to run Notepad first in Administrator more (right click, select Run as administrator), then open machine.config
Ramkumar Thangavel.

For Visual Studio:
Right click on Visual Studio icon
(If you are right clicking on a taskbar icon, then you'll need to right click on the Visual Studio icon in the list as well)
Click Run as administrator
Within Visual Studio, click File->Open->File... (shortcut is Ctrl + O)
From here, navigate to your machine.config. For .net 4, it's probably here: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config

Related

Visual Studio 2015 designer.cs file gets all custom components removed

I am using Visual Studio 2015 on an ASP.net WebForms project. When I save a .aspx page the .designer file gets regenerated but it removes all references to any custom component on the page (ex: ) and leaves intact the references to any default built-in .net components (ex: ).
The problem is only happening on my machine. The other team members do not have this issue so I know there is not something wrong with the project itself.
One thing I have found is that any time I add or remove an extension in visual studio, it shows the Restart button. When I click that button to restart VS, then the problem with the designer files goes away. But as soon as I manually close VS using the X at the top right, and restart it, that is when the problem comes back.
I've tried with and without using Run as Administrator with no luck either way.

How do I open this in Visual Studio?

I came across this project online and can't really get it to open with Visual Studio. Extremely new to Visual Studio. This doesn't have an exact project file that can be opened from what I've understood. It has a bunch of .cs and .aspx.cs files. How exactly do I open and execute this project in Visual Studio? Or am I barking up the wrong tree and trying to open something that can't be opened?
Link to the project - http://www.speedyshare.com/98XZf/ca-ma-sy
May be your project is not a web application project. it might be wesite.
If it is web application you will find .csproj file, if you didn't find then just follow the below steps
Open Visual Studio
click on file --> Open --> Website
You will get dialogue box with local file structure, Just Navigate to your project folder and select and click on open, After click on open your solution will be ready with your project.
Cheers,
Vijay

How do you allow parent paths in Visual Studio 2013?

I am converting a classic ASP site to a Visual Studio 2013 MVC project. When I run the classic ASP code inside of the Visual Studio 2013 debugger I get an error message:
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
The question is: how can I enable parent paths in the VS2013 debugger?
FYI - This is not IISExpress and enabling parent paths is different.
I discovered the answer myself. Here is how I did it.
I opened Task Manager and saw that Visual Studio was running
processes of IISExpress for the web server functionality.
I clicked on Start and entered IISExpress to find out where it was installed. To my surprise, but an obvious choice, it was located in documents.
I opened the C:\Users\Mike\Documents\IISExpress\config folder then
opened Notepad as an administrator.
I then opened the applicationhost.config file and under the <system.webServer> element there is an <asp> element. I modified it to read. <asp scriptErrorSentToBrowser="true" enableParentPaths="true">
I then opened by MVC solution and ran the Classic ASP program without any
problems. Everything works!
I have Visual Studio 2015 and I had to do something else.
Right-click on the IIS Express icon in your tray while the application is running, and select Show All Applications.
Click on the application you want to manage. You'll see the location of the IIS Express server config file in the details section below.
Edit it as administrator and add enableParentPaths="true" to the asp XML element (under system.webServer), as in the Mike G's answer.
For me, the config file was located in SolutionDir\.vs\config\applicationhost.config.

Project running on IIS

I have a web application that configured to run using IIS , but I don't have IIS currently installed on my machine and i don't want to change it
so can any one tell me how to change the .csproj file to run on the development server
Your project in Solution Explorer -> Right-Click -> Properties -> Web
Select "Use Visual Studio Development Server" option.
Save settings. Build and run your web application.
Or you can edit your .cproj file manually:
Open it in text editor
Find <WebProjectProperties> section ( most probably at the end of file)
Change <UseIIS>True</UseIIS> option to <UseIIS>False</UseIIS>
Save your file
You haven't said which version of Visual Studio you are using, but in VS2010, you right click your project, choose properties, go to the "Web" tab and finally check the "Use Visual Studio Development Server" radio button.
Thank you All for your help , I have found it , I edit the .csproj file , and change
<UseIIS>True</UseIIS>
to
<UseIIS>False</UseIIS>
Thanks very much

Convert Visual Studio 7.1 project to Visual Studio 9 project?

I have an Asp.Net project in Visual Studio 7.1 , Now when I open it in Visual Studio 2008 , I can't access to project files :
(source: picfront.org)
How can I open the project with VS2008 or VS2010 ?
Open the sln file with a simple text editor (make backup)
and search for your project that did not find, and correct the directory path.
You have probably a line like that... you need to fix the dir, saved it and open it again.
Project("{XXXX-XXXXX-XXXX}") = "PECeShopSame",
"Dir1\PECeShopSame\PECeShopSame.csproj", "{XXXX-XXXXX-XXXX}"
I see this is old post but I learned that you can also accomplish converting the .csproj file by browsing to the .csproj file and double-clicking on it. Visual Studio will open and offer to convert it for you - follow the wizard. As a final step in the wizard, it will prompt you to select the project in solution explorer and convert to web application.
I had situation where the files didn't appear in solution explorer after converting .csproj file therefore I couldn't select "convert to web application". I closed the (empty) solution then opened as web site (instead of project/solution) and all was well!

Resources