Dave's Technophorical Times

A blog about Microsoft's Technologies!
SharePoint :: MVC :: ASP.NET :: IIS :: SQL Server :: Visual Studio :: MS Access

You created a DLL in Visual Studio 2010 so you can reference it in MS Access VBA.

It works fine in 32-bit Office but you get an error (error 429 activex component can't create object) when trying to run in 64-bit Office.

Solution: Unfortunatley non built-in ActiveX objects cannot be created in 64-bit Office and there is no direct work around for this.

From here: http://superuser.com/questions/803943/how-to-disable-javascript-debugging-in-ie11

The options in VS for exceptions to determine if the debugger should break on an exception. Though VS will always break on an unhandled exception and a language break (debugger). The options do not stop the script debugger from being attached when you launch IE from VS.

The options in VS to enable or disable JIT debugging change just the just-in-time debug feature. Enabling JIT debug simply means that if a running application not launched by VS hits a break condition the user should be prompted if they want to attach VS to debug the application. This also don't change if script debugging is enabled when you launch IE from VS.

The options in Internet Explorer to disable script debugging only changes if IE should run with debugging enabled always. In IE11 with VS2013 this feature is never needed but is there to support older versions of VS.

The easiest way to get the behavior you want is to do:
1. Right click on a aspx/html file there is a ‘Browse with…’ item. This will bring up a dialog to configure your browser.

2. Click the Add button. Add something like:
    Path: c:\Program Files (x86)\Internet Explorer\iexplore.exe
    Friendly name: Internet Explorer (no debug)

3. Set that as your default

This basically launches IE outsie Visual Studio so that those annoying Javascript errors stop happening. You will still be able to debug your code though.

Visual Studio 2010

If you don’t want the Output Window to show up every time you do a build, you can easily keep it from happening by going to Tools -> Options -> Projects and Solutions -> General and deselect the “Show Output window when build starts” option:

You write some LINQ code to update your SQL tables like this below BUT it does not throw an exception and it does not Update the tables!

using (var db=new SomeDatabaseContext())


The reason why is because your Table does not have a Primary Key! You can update your DBML designer to have that Primary Key and you don't need to touch the actual SQL Server tables for this to work!

Best of Luck.

So I just wasted 2 1/2 hours tring to figure out the WHY the Tab ordering was not working on my Form (C# project Visual Studio 2010).

No matter what I did the order DID NOT CHANGE. There are all kinds of controls like Groupboxes, Panels with Controls inside Controls. No big deal. The View -> Tab Order feature made NO DIFFERENCE at all!!

The only way the tab Order worked was by actually updating the DESIGNER to order the Controls in the way I wanted! Like this...

            this.pnlSubAbc.Location = new System.Drawing.Point(3, 344);
            this.pnlSubAbc.Name = "pnlSubAbc";
            this.pnlSubAbc.Size = new System.Drawing.Size(562, 212);
            this.pnlSubAbc.TabIndex = 2;
            this.pnlSubAbc.TabStop = false;
            this.pnlSubAbc.Text = "Products Carried";

Hope this Helps someone else out there.

The ItemUpdated event does fire twice - by design. Once when the item is actually updated, and then again when SharePoint is done checking in the item.
See http://www.simple-talk.com/dotnet/.net-tools/managing-itemupdating-and-itemupdated-events-firing-twice-in-a-sharepoint-item-event-receiver/ for more info on that. 
Some people use a workaround like this:
if (properties.AfterProperties["vti_sourcecontrolcheckedoutby"] == null &&    
              properties.BeforeProperties["vti_sourcecontrolcheckedoutby"] != null)
           //This is when the update event is triggered by check-in.
          //This is triggered by events other than check-in action.

The default file name given to your solution will match the project name.  I.e. a SharePoint project SharePointProject1 will result in a package SharePointProject1.wsp.

If you want VS to spit out a different name, modify the name attribute in the Package\Package.package file for your project.

To open the file mentioned in the above post, use Notepad as Visual Studio will automatically detect the .package extension and open the associatied template file and NOT the .package file itself.

Also be sure to remove the write protection from the file otherwise Notepad cannot overwrite it.

If you have installed IE10 and you are running Visual Studio 2010, you may get this annoying pop-up.
"Attached the Script debugger to process '[1111] iexplore.exe' on machine 'MINE' failed. A debugger is already attached."
There is a simpler fix for the JavaScript debugging issue in IE10:
  1. Close IE
  2. In elevated cmd prompt run this command:

regsvr32.exe "%ProgramFiles(x86)%\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll

or %ProogramFiles% on a 32-bit OS.

Hope this helps!

If you need to debug a WCF Server, or somehow need to step into code on IIS, you will need to do the following to prevent the message  “Unable to automatically step into the server. Unable to determine a stopping location”. The message might be slightly different but generally it means you can't debug in IIS!

It turns out that Visual Studio 2010 comes with a default setting to debug ‘Just my code’.

To correct the problem, go to Tools – Options – Debugging – General and switch off the option ‘enable just my code’.  

And of course don’t forget to set debug="true" in the web.config file of the webservice. Double check your publishing Transformations too if using any, as that might be removing the debug="true" property in your web.Config file.

This will hopefully help someone else out there!

When working in Visual Studio you may notice that all of a sudden you may notice that the Backspace key does not work and the error keys do not either.

To fix select Alt + Enter. This brings the focus back to the window, and all is well.

The Blogger

Dave Stuart I'm a Developer with a passion for coding. I enjoy the challengers that come with the job! SharePoint is one of my expert areas along with .NET Web Development with MVC and good old MS Access VBA coding. I Blog so that I can remember how I did that way back when; PLUS all this stuff is searchable! I constantly study and run my own business, Dafran Inc. I have passed 22 Microsoft Exams since 1998 when I first jumped on the treadmill of knowledge. I hope that you enjoy this Blog as much as I enjoy updating it. All the very best from Calgary, Alberta, Canada. contact me at linkedin @ dafran.ca


<<  March 2023  >>

View posts in large calendar

Sign in