Exception when Deploying to SharePoint 2010 from Visual Studio 2010 - visual-studio-2010

I've done MOSS 2007 development for some time, and am just starting to get my feet wet with SharePoint 2010. I created a SharePoint project, added a Visual Web Part, and typed "Hello, World!" into the web part's user control.
Everything works fine the first time I deploy the project (by selecting Deploy from the project's context menu in the Solution Explorer). It deploys the project, activates the feature, and the web part is immediately available for use.
However...
The second time I deploy the project, I get an error in the Error List stating:
Error occurred in deployment step
'Recycle IIS Application Pool':
Invalid namespace
Now, if I go to SharePoint and manually delete the web part, deactivate the feature, and retract the solution, I can deploy from Visual Studio again; the error seems to only occur if the project has been deployed at least once.
I think I'm missing something obvious here. Any recommendations?

I found the answer!
But not on the Web, so I'll post it here as I did in a related posting on SharePoint.SE.
Apparently, VS 2010 uses WMI to control IIS during a redeploy. Without the features enabled, I got the error described above.
The solution was to: open the Turn Windows on or off menu in the Control Panel (under Programs), and enable WMI compatibility. The path to the feature is:
Internet Information Services -> Web
Management Tools -> IIS 6 Management
Compatibility -> IIS 6 WMI
Compatibility
Edit: For reference sake, this article has screenshots of which features should be activated on Windows 7 to support SharePoint.

Related

Default ASP.NET Core MVC project won't run

I created a new ASP.NET Core MVC project with Visual Studio 2019, using the built in default template. I simply ran the project by clicking the green 'play' arrow where it says "IIS Express" (or by pressing F5). I haven't modified anything, yet when my browser opens up (in this case, Microsoft Edge) I get this:
Can’t connect securely to this page
This might be because the site uses outdated or unsafe TLS security settings. If this keeps happening, try contacting the website’s owner.
Your TLS security settings aren’t set to the defaults, which could also be causing this error.
I've opened a 'ticket' with Microsoft, but haven't heard anything yet. It may be that there is an issue with my IIS Express installation, but I'm not sure how to figure that out. I normally prefer to run my ASP.NET MVC local development from my local IIS, but it seems that IIS Express is the default way for Core MVC.
I modified my install of Visual Studio 2019 by removing all the web (ASP.NET) components, and then modified it again by adding them. After this, the default ASP.NET Core project does indeed work and debug with IIS Express.
I don't know how my install became corrupted, but it must have been from one of the numerous Visual Studio updates that seem to be released every few days.

Unable to open visual basic 6 project on visual basic 8

I've created a project on VB6 at but when I am opening it on VB8, it shows the following error:
How to fix it?
As listed by GSerg in the comments, this appears to be a known issue documented in Microsoft Knowledge Base article 896292: You receive a "The remote procedure call failed" error message when you upgrade a Visual Basic 6.0 project to Visual Studio .NET 2003 or Visual Studio 2005 on Windows Server 2003 SP1 or on Windows XP SP2
To reproduce the solution here:
Cause
This behavior occurs because the VBU.exe tool has compatibility issues with the Data Execution Prevention (DEP) option.
Note: The VBU.exe tool starts when you upgrade the Visual Basic 6.0 project by using the Visual Basic Upgrade Wizard in the Microsoft Visual Studio .NET IDE.
Workaround
To work around this behavior, add the VBU.exe tool to the DEP exclusion list. To do this, follow these steps:
Click Start, click Control Panel, and then double-click System. The System Properties dialog box appears.
Click the Advanced tab, and then click Settingsunder Performance. The Performance Options dialog box appears.
Click the Data Execution Prevention tab. Verify that the Turn on DEP for all programs and services except those I select option is selected
Note By default, the Turn on DEP for all programs and services except those I select option is selected in Microsoft Windows Server 2003 Service Pack 1 (SP1).
Click Add. Locate and then click to select VBU.exe. Click Open.
In the warning box, click OK. VBU.exe now appears in the DEP program area.
Click Apply, and then click
OK. A dialog box appears that states that you must restart the computer for the setting to take effect. Click OK.
Try do divide your project to small projects(or comment large part of your project) a try again in each small project.
The idea is to find the function that is production the error.
My intuition is telling me that maybe is a DLL or OCX problem. Try to see all the external DLL or OCX calls and remove from the original project and try again the upgrading.
Most developers who move their VB6 projects to .Net do not even try to port them over. Even with third-party "conversion" software, the effort can be incredibly tedious. So much so, that most developers simply re-write the application completely. Consider it a move to a different language. In fact, some developers use that opportunity to port it to C# instead. I'm a die-hard VB6 user/fan but were I to attempt to port my 200 form accounting application, I'd just re-write it in C#. I started porting it, tried third-party conversion apps, just wasn't worth it.

Visual Studio web project has IIS configuration warnings

One of the web application projects in my visual studio solution has a blue exclamation mark icon on it and the tool tip shows The Web project <Project.Name.Here> has IIS configuration warnings
I can't see anything in the project Properties pages, or in the web.config file. It started yesterday, and I assumed restrating VS and reloading the project may get rid of the warning, but it has not.
What is this and how do I go about resolving this issue?
Google has not been helpful this morning!
Try right clicking the solution in the Solution Explorer, the option Resolve Errors should be available.
Selecting this should show you the message behind the icon you're seeing on the project. For me, this was:
ASP.NET 4.0 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly.
If this is the message you're receiving, this MS blog post may help you fix it.
Update
Note that once you've selected this option, the IDE assumes you've resolved the errors and removes the icon and menu option (!). So make sure you read it or restart VS to see it again.

The Web Server Could Not Find the Requested Resource visual studio debugging

Issue
I have a .net 4.0 Web Application running in visual studio 2012, every time I go to debug the site i'm receiving the following error:
The Web Server Could Not Find the Requested Resource
What I've tried
I've followed microsoft's website with solutions: msdn
From a command prompt window, run the following command: systemroot\Microsoft.NET\Framework\ versionNumber \aspnet_regiis -i
I've also attempted to remove the .csproj.user files
Since we use Source Control i've deleted all items, the site and apppool and reconfigured from scratch.
AppPool is set to allow 32-bit applications
All to no avail...Anyone have a solution that might solve this visual studio debugging nightmare for me?
Steps:
Close all solutions in Visual Studio
open IIS7 (run > inetmgr)
Click your top node (computer name)
Open the "ISAPI and CGI Restrictions" option
check if your .Net version has the correct restriction (for example, if you're working with 4.0 is should be on "Allowed")
I was getting the same error when i was running the ASP.NET project from the IIS. I resolved this issue by configuring IIS.
Go to run
type appwiz.cpl and press enter.
Look for "Turn windows features on or off" and click on it
now windows will open for Turn windows features on or off
look for Internet Information service and select that option.
go to world wide web service under the Internet Information service branch
expand Application development feature
Select all the ASP and .net version. and click on OK.
now try running the application from asp.net , it will work :)
I had the same symptoms but a completely different problem. I had attempted to install Url Scan and it didn't seem to work correctly as I could not find the .ini file to edit settings within. I had forgotten that I had installed it, but it appears by default it will prevent debugging from working.
Uninstalling Url Scan solved the issue for me. To uninstall it I had to right-click on the .msi file and choose Uninstall. Url Scan did not show up under the "Add or remove programs" section.

Debugging Classic ASP in Visual Studio 2010

I have read this question and this page linked to in the question, as well as dozens of other articles about debugging asp classic with VS but it's still not clicking for me.
I am using VS 2010. The files I want to debug live on a remote server. I have installed the Remote Debugger on the server. I opened the website and attached to the w3wp.exe process on the remote machine. I created some breakpoints but I am still getting "The breakpoint will not currently be hit. No symbols have been loaded for this document" on those breakpoints. Is that the problem or is that a symptom of a larger problem with what I am doing?
First, by default, when you open a web site in Visual Studio, you're opening it via the file system, not via IIS. If this is the case, then Visual Studio uses the internal Cassini web server, rather than IIS.
The Cassini web server does NOT run classic ASP. IIS does. So the first thing you need to do is figure out how to debug in IIS.
It should go without saying, you need to have IIS installed on the machine you're working with, and have the web site you're debugging set up the same as it would be on the server. (so you should be able to run http://localhost/somepath and be able to see your site)
You also need to attach to the running process of Internet Explorer. There's a link to that as well.
Next, you need to get Visual Studio to attach to IIS and execute the web site rather than use the built-in web server and enable debugging.
That's covered here: This topic is no longer available (which is the first child link of the page you liked to in your question here.
From there, you should be able to follow the remaining links and get up and running.
Edit - added
This article takes you through it step-by-step.
Debugging Classic ASP ( VBScript ) in Visual Studio 2008
I've just had this problem when trying to debug a classic ASP application in VS2012.
There's no need to copy PDB files, because there aren't in this kind of projects, so follow this steps:
Be sure that ASP compatibility is turned ON in your IIS installation (Control Panel -> Enable/Disable Windows features -> Internet Information Server). You can install all features if you want to be sure.
Access to the IIS administration.
Locate your WebSite, then access the ASP configuration.
Find "Debugging properties" and then enable client and server debugging. You can also enable error sending to the browser.
After that, just attach the VS2012 debugger to the "w3wp.exe" process. DEBUG -> Attach to process....
This will work for local debugging. If you want to do remote debugging, you must prepare the remote server to allow remote debugging (TIP: Use the same user in both, server and your machine, and be sure it has enough privileges). For more information take a look at:
Installing the Remote Tools
Debugging Classic ASP ( VBScript ) in Visual Studio 2008

Resources