Error Connecting to Undo Manager of Source File XYZ - asp.net

I've been getting an error recently while debugging an ASP.NET application in Visual Studio 2008:
'Error connecting to undo manager of source file XYZ'
Any idea how I can get rid of the error?

Even simpler:
My experiment consisted of simply opening the designer.cs file, typing a character somewhere in the file, deleting the new character, saving the file and recompiling.
Found on That One Developer Blog and it worked perfectly for me.

Wouldn't you know it; just after I post this I find a workaround in Scott Hanselman's Blog, in the comments:
1) Right-click the designer file and select delete
2) Right-click the aspx file and select Convert to Web Application
Thanks to Matthew, whomever you are.

I have face the same problem. And I solved it by exclude this file from project and rebuild solution. Then include this file again...DONE!
GOOD LUCK!

I faced the same error now. I had to just open the designer file while editing the aspx file and once done, save both. You don't even have to type any text in the designer. That did the trick!

this one has worked for me:--
"Open desiner.cs file Type some text in it Delete the text you have typed. Save and build the application"
Thanks a lot Jitendra Kumar!!

Open desiner.cs file
Type some text in it
Delete the text you have typed.
Save and build the application.

*** I know this is an old question, and already answered but i'am adding my answer , hopefully it would help someone
In my case the referred file was .cs class, and since there is no .desiner.cs file, i needed another solution
so the solution for my case was to navigate tho the solution folder in windows explorer and delete the .suo file , reopen the solution and rebuild

Closing the solution and deleting the Temporary ASP.Net files directory fixed this for me. [link]

I got this error when i double clicked an asp.net button by mistake and removed it afterwords in the aspx file and .cs file but not in the Designer.cs file. Make sure all the three got files got updated.

Related

ASP.NET MVC 5 Cannot Add Controller

all,
Just wanted to add to the body of knowledge. I was confounded, trying many solutions, when I couldn't add a controller to just one MVC project. I was getting the error:
There was an error running the selected code generator:
'The parameter is incorrect [...] '
Answer below...
It turned out to be very obvious, but since it wasted my time, here you go:
I had saved my web.config file using Save as... to another location as a backup before making changes. The project was tracking the saved copy instead of the one in the project. It looked the same in the Solution Explorer, of course. Remove, add existing, et voila.
I solved this by Excluding the Web.Config from the project and then Including it in the project
It's a simple close your web.config file(or any system file) and try again. It will work.

Don't delete specific files during asp.net publish?

I have a website I'm publishing in Visual Studio. It's publishing using the File System method, and I've selected the option to delete all existing files before publish.
Is there a method that will exclude two specific files from deletion? Both of these files exist in the root of the website folder.
I've tried editing the .pubxml file that is created by Visual Studio to include a "MsDeploySkipRules" option but it never seems to work, no matter what settings I've selected. I've also tried to turn "UsMsDeployExe" on and noticed no difference.
I am sorry I don't have the exact answer for what you have asked.
But there is a work around to achieve what you want. see if this helps
You can include those 2 files into your solution and then set the properties
Build Action = content
Copy to output Directory = Always
This way you will always gets same copies in your publishing directory
Hope this helps!
If you find answer helpful please up vote
Thanks
Mohan!

Visual Studio not showing my .aspx file in Solution Explorer

I have a index.aspx in the project root but the solution explorer does not show the file.
I first started out with a html file, then I wanted to convert it to an ASP file. So I pressed save index.html as... and choose index.aspx as the new file name. But then I started getting error windows when editing the index.aspx. I noticed index.html was still in the root of the solution but did not show in VS-2013 solution explorer. So I figured I get rid of the index.aspx inside the solution explorer but both files disappeared from my disk. I somehow managed to retrieve the index.aspx but I cannot get it in the solution explorer. When I open the file manually the error windows are gone but I'm afraid I might have broken a link I'm unaware of in the program by deleting it in the Solution Explorer.
-Edit-
I could just create a new webforms file and copy the contents but the issue described above feels strange and unexpected. I like to have it clarified.
You've deleted it from your solution.
Right click your solution.
On the toolbar at the top of Solution Explorer find the "Show all files" icon and click it. You can now see all files on the file system, not just those included in your solution.
Find the file, right click and include it in your project. It'll have an icon that looks like this:

ASP web.config exclude bin folder on publishing

It is my first experience with asp.net. I have some large dll in my bin that never change and I would like to exclude them from publishing every time I make small changes to the pages. I know I need to add a section in my web.config but I do not know where and what to write in it to exclude the bin folder.
I already looked at few similar question on SO but none of them are really giving a clear answer to my need.
This is my web.config in which I have already added successfully the connection string for the production server and the error mode to have some feedback about errors during deployement phase.
Few lines of code to direct me on what to change will be appreciated.
To exclude any file from being copied; you can control this behavior by adding that file to your project; Once you add that file, you will see it in your Solution Explorer Right click on file and choose Properties . On the property page there is a Property called 'Copy to Output Directory' use that.

Convert to web application error - could not parse aspx file

I occasionally get errors in my aspx files which are caused by problems with the designer file. When this happens I delete the designer file, right click on the aspx file and select "Convert to Web Application".
Usually regenerating the designer file works perfectly, however sometimes I get an error which simply says "Could not parse the file pathToFile.aspx". When this happens there are no useful errors displayed in the error panel which would indicate what the problem is.
I got this error a little while ago, did some searching and found a blog which explains how to get round this problem. It suggests closing the file, cleaning the project, rebuilding then tring again. VS should now give you a more useful error message which pinpoints the problem. This has worked for me in the past, but doesn't work all the time.
Has anyone found a better way of identifying the problem in the aspx file when the "Could not parse file" error is displayed?
I've still not managed to find out why this problem is occurring. VS just seems to be tying itself in knots. However I have found another solution which works when the solution mentioned in my question does not. Simply copy the aspx and code behind into notepad, delete the files from your project, recreated them and copy the code back in. Why does this work? I have no idea
This call is old, but here is a solution if someone else finds this. I had the same problem migrating an AspX app from VS2008 to VS2015. Not all the files migrated. Make sure ALL files have namespaces, and that the name space is references correctly in the aspx file.
Right click on the project select unload project
In windows explorer, create a new file for every file that did not migrate, my example MyForm.aspx, call this file MyForm.aspx.designer.cs
The file must contain the following:
namespace MyProject.pages
{
public partial class MyForm
{
}
}
Save the file and edit the project file (MyProject.csproj) find the entry for your form
<Compile Include="pages\MyForm.aspx.cs">
<DependentUpon>MyForm.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
And under it link the new design file:
<Compile Include="pages\MyForm.aspx.designer.cs">
<DependentUpon>MyForm.aspx</DependentUpon>
</Compile>
Do this for all the files that would not convert. Once completed reload the project and for each file open the markup, add a space, and save. VS will parse the file and store the contents in the designer.

Resources