Error connecting to undo manager

 vs_errorWhile developing a web application for a friend of mine, I ran into a Visual Studio error message I hadn’t seen before: Error connecting to undo manager of source file ‘D:DevelopmentSomeWeb ApplicationDefault.master.designer.cs’.

The error occured whenever I tried to start the (web) application in debug mode. The application did start OK after the error message though. Starting the application without debugging didn’t cause the error.
I closed the solution file I had opened, but that didn’t solve the  issue. Stopping the ASP.NET Development Server didn’t do anything either. I had to exit Visual Studio al together to get this error to go away.

I searched for this specific error, and saw it already occured in Visual Studio 2005 SP1. Scott Hanselman has a blog post on how he solved this issue. Now, in Visual Studio 2008, this error still seems to be in there…

Error adding an OleDb Data Connection to Visual Studio Server Explorer

The error I’m getting when setting up an OleDB connection to an Access database* via the Server Explorer in Visual Studio 2008 is Incorrect Add Connection screen‘Format of the initialization string does not conform to specification starting at index 0’. The screen doesn’t display the way it should be displayed, as you can see in the screenshot on the left.

There is a possible fix at svenM’s blog (it’s about checking the existence of a key in the registry called ‘ProgID’ and the default value, as you can read in this article), but this doesn’t seem to work for my situation.
It took me some time trying lots of  ‘possible fixes’ (like the registry change, attempts to (re-)install mdac, uninstalling and installing Visual Studio, and so on) . None of them helped. I even went through all four pages of this lengthy thread, but to no avail. The only thing I haven’t tried yet is the most rigorous solution: format the disk and start with a fresh install.

I’m getting annoyed over here…, if you have any tips: let me know.

* I won’t go in to whether an Access file is or is not a database ;). And although I generally wouldn’t consider Access as the database solution for an important business application, I do think it does have its pro’s in specific scenarios, like for a relative small web application.

Getting the ModalPopupExtender to work in SharePoint 2007

Getting the ModalPopupExtender from the Ajax Control Toolkit to work (decently) in SharePoint was not exactly a walk in the park. With a default SharePoint installation, the modal popup is partly positioned ‘outside’ of the page (you only see the bottom right part of the popup in the top left corner of the browser). Postbacks are not executed or executed poorly and the page gets garbled up. A possible solution for the positioning of the popup is to set the X and Y property of the ModalPopupExtender. Downside is you never know (for sure) if the popup is positioned inside the visible part of the browser because of things like non-maximized browser, different resolutions and so on.
Today we seem to have solved our issues with the ModalPopupExtender in SharePoint. We haven’t tested it in all scenario’s yet, but we’ll get to that. At this point everything looks the way it is supposed to. And it seems to work, too… ;).

The extra steps we took to make these two play together the way we wanted them to, besides the usual steps to make Ajax work in ASP.NET 2.0, are:

* Because of our setup with close-images that postback (because we have to clear controls and that sort of stuff) and more, we couldn’t use the TargetControlID property for the ModalPopupExtender. Well, we could, but that would result in the background not being displayed properly half the time ;). This can be solved by setting the TargetControlID to a dummy control (like a hidden one) and showing the popup from code.

** We have a usercontrol with several usercontrols in it. This one usercontrol (the parent) was added to a page. The normal (postback) controls on the usercontrols didn’t work after one of the modal popups was shown. And I can image neither would any other ‘normal’ controls on the page, but we didn’t encounter this scenario. The problem was the page would freeze with a message in the taskbar stating ‘The page is busy submitting data to the server’ directly after an Ajax postback. The controls that performed a ‘normal’ postback did nothing: the serverside code just was not executed. We solved this by putting an updatepanel around everything inside the usercontrol. That way the normal controls would postback in an ajaxy way too, apparently solving the ‘The page is busy’ message.

We’ll be testing this solution over the next few days. If any problems pop up, I’ll keep you posted.

PageRequestManagerServerErrorException (status code 500)

In a quick AJAX demo I had to create today, I ran into a (somewhat cryptic) PageRequestManagerServerErrorException. I needed a simple form of the Cascading Dropdown, one that doesn’t use a (web)service for its data, but gets it from a simple method. Here’s the setup, and the cause…

Lets start with the exact error message:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500

I needed 2 DropDownLists working together to enable users to first select a month, and then select a day. Of course, you want the second DropDownList to only display days available for the chosen month. Because of that I had two dropdownlists in an updatepanel, and set the first one to AutoPostback so it would trigger the updatepanel. The first one had items set to something like this: <select item>, January, February, March, and so on. The second one got its items from a method, based on the selected value in the first. This worked like a charm, and all was well. When I wanted to check every scenario, I found that selecting <select item> didn’t clear DropDownList2 like I coded it to, but it threw the Exception. What caused this?

When setting items throught the IDE, this HTML is generated:

<asp:ListItem>&lt;select item&gt;</asp:ListItem>
<asp:ListItem>First item</asp:ListItem>
<asp:ListItem>Second one</asp:ListItem>

Because the value property for the items wasn’t set explicitly, it is generated (or should we say substracted?) from the information that was entered. Therefore, the Value property of the first item was ‘<select item>’. I can imagine how something like that can mess up a JavaScript environment. ;) I opened up the items for the first DropDownList, and set the value properties for each item explicitly (although setting it to a decent value for the first item did the trick). That resulted in this HTML:

<asp:ListItem Value=”0″>&lt;select item&gt;</asp:ListItem>
<asp:ListItem Value=”1″>First item</asp:ListItem>
<asp:ListItem Value=”2″>Second one</asp:ListItem>

Notice the Value attribute in the ListItem tag? That’s the one that will keep your project from throwing a PageRequestManagerServerErrorException.

By |February 20th, 2008|.Net, Error, HowTo|1 Comment

BloggingAbout: we’re back

Dennis already blogged about it: we had some problems with the availability of BloggingAbout since last night. The error was fixed this afternoon, so everything should be back to normal. If you’re experiencing any difficulties, please let me know through the contact form, or mail me at rick.van.den.bosch[at]bloggingabout.net.

Two more weird messages / mess-ups …

A Dutch web site, made in SharePoint, uses a specific ActiveX.
Only the name of that control is not really specific:
ActiveX 


The MSDN forums haven’t been available the last couple of hours.
The message isn’t so pretty:
MSDN Forums

Technorati tags: ,
By |December 12th, 2007|Error, Funny|0 Comments

"Some of the properties associated with the solution could not be read"

Next to the message in the subject, one of the symptoms we encountered is that although the solution contains some test projects the ‘Create private accessor’ menu has disappeared. Also, selecting ‘Create unit tests…’ produces an error. And when editing a testrun config and selecting the ‘Code coverage’ option, the settings dialog simply closes, without any message.

All these (and probably more) symptoms can occur because of a corrupt solution file. In our case the nested projects section was corrupted. Chances are this is because of some project or solution folder not being removed the way it should have been. Anyway, I tried fixing the solution file by hand but because of too many projects and solution folders this wasn’t the way to go. Those GUIDs don’t make a file very readable… I made a new solution file, containing the same solution folder structure, and added the existing projects. I overwrote the existing solution file, and that was that. So when you’re experiencing any or all of the above symptoms, try building up a new solution file.

Hope this helps.

Technorati tags: , , ,

Sometimes even experts mess up

Today I received a mail from Microsoft with an invitation for an Expert session. As you can see, sometimes even the experts at Microsoft let a glitch through…

mail glitch
(Translation of the text inside the circle: Dear sir, madam [personalize],)

By |November 29th, 2007|Error, Funny|0 Comments