VS2010 Error in Recycling IIS Application Pool: Not Found - visual-studio

I'm making a Sharepoint visual web part in Visual Studio 2010 and it seems like out of nowhere I started receiving the error: "Error occurred in deployment step 'Recycle IIS Application Pool': Not found"
In the output for my program it says which application pool it's looking for and I know it exists because it shows up in IIS Manager
Now I've already tried resetting IIS, along with recycling the application pool manually in IIS Manager.
Really I'm sort of at the end of my rope and any help would be greatly appreciated.

This usually happens when the user that has run Visual Studio doesn't have rights to Recycle the IIS application pool.
To solve this, run visual studio with some user who has rights (shift + right button -> run as different user) or try to follow this:
http://msdn.microsoft.com/en-us/library/aa954062%28v=bts.70%29.aspx

The simple solution for the above issue is
Step1:Close the Visual Studio
Step2:ResetIIS
Step3:Open Run and Enter Services.msc, Restart the "Windows Management Instrumentation" service
Step4: Recycle the Application pool in inetmgr.
Step5:Reopen the VisualStudio now deploy.
Hope it will help others.
Thanks & Regards
Kishore Appini

When I experienced the same error, checking the following helped me:
Make sure the Web Application exists on SharePoint.
Make sure the site collection you are trying to deploy to, exists.
This is the siteURL specified in your project's properties. To see
this property, you have to press the F4 key after selecting the
project in solution explorer (in Visual Studio).
In my case, I had not created the site collection and also the siteURL had a previous server mentioned in it.

You need to set the 'Site URL' correctly in the project properties.
click on your project name in the solution explorer and press F4 for properties.
Then check the Site URL.
The Site URL must be the same as Project Server URL.
example http:// spsw001/pwa
This solved the problem when I got this error message.

This must be the solution for the scenarios:
http://praveenbattula.blogspot.in/2013/07/error-occurred-in-deployment-step.html

If you have a public URL for your collection which is a DNS entry that is pointing to your SharePoint server then what you need is an "Alternate Access Mapping".
Go to Central Admin > Application Management > Configure Alternate Access Mappings and create an internal URL for your public URL.
Set your project server url property to point to the newly created alternate access mapping and it should work.
Note: This is valid for SP 2013

In my case it was due to missing database permissions. As mine was a DEV box, I just added my Windows account (=the account I was logged into the DEV server) to SQL Server as sysadmin.

Related

Sitecore Cannot open database "marktwoSitecore_Web" requested by the login. The login failed. Login failed for user 'blah''

I am currently trying to set-up a Sitecore project on my PC. When I go to view the project on my browser I get the following error:
Sitecore Cannot open database "marktwoSitecore_Web" requested by the login. The login failed. Login failed for user 'blah''.
These are the steps that I have carried out so far:
1) Firstly there are three types of sitecore installations to do:
- Complete
- Database only
- Client only
I have gone with the Client only installation.
2) The Sitecore "Client-only" installation instance was made inside the inetpub/ wwwroot folder.
3) I then made a visual studio project
4) I made a folder called "Libraries", which is located in the root of my visual studio project solution. I copied over all the relevant Sitecore.dll's from the wwwroot project to my visual-studio project into the Libraries folder. I also replaced the Default web.config file in my Visual studio project with Sitecore's version of Web.config. And then I added Sitecore references to my Visual Studio project.
6) With all of the initial configuration done; I set-up a publish profile so that I could publish my C# code to inetpub/wwwroot project. I did step four so that my publish would not overwrite sitecore dlls.
5) I changed the Connection strings in App_Config/ConnectionStrings.config to point to the Web, core and master sitecore databases. That were created during the Sitecore installation.
Those were the steps I did prior to getting the error about invalid login credentials. I am not sure why I am getting this error; since I went into Microsoft SQL server Management Studio and I gave the user "blah" admin rights to all of the datbases: Master, web and core.
Any support and guidance would be greatly appreciated; as I am unsure of how to address this problem
This error is happening because the web database referenced in your Website/App_Config/ConnectionStrings.config is either not there or the permissions are not set properly on that database. The easiest way to troubleshoot is to load SQL Server Management Studio specifying the host, username and password that are in your connection strings and see if it connects. It sounds like you are probably logging in with your Windows user when you are making the changes listed above.
You could try making the blah user a "db_owner" to see if that helps or your local instance may not be in "mixed authentication mode" which allows for named users and windows users. You can change that in the settings, but you need to restart the service for it to take effect.

How do I debug my Azure web role in Visual Studio 2012?

I know this is probably something really stupid, but I've been searching google for 2 hours to figure this out.
I have a new test Azure app that I would like to debug in Visual Studio. If I set the startup project to the Web Role (MVC) project, I can hit breakpoints in VS, but it's not running in the emulator so all of my Azure calls fail.
If I set the startup project to the Cloud project, the emulator starts, then Visual Studio ends debugging and my web role is never launched.
What am I missing here? How do I launch my web page and still have access to the emulator?
(Side note.. why isn't there a Visual Studio 2012 tag??)
Although this doesn't answer your question directly, I always make sure that my projects run outside of the emulator. If for nothing else, this just greatly improves the efficiency of your development.
To avoid the issue of the Azure calls failing, one very basic practice you can use is to use a Dependency Injection framework (such as Unity or others) and create a LocalConfigurationManager and a AzureConfigurationManager which both implement some interface like IConfigurationManager, then if your code needs to ask Azure for an instance number, or config setting, etc... the LocalConfigurationManager can just return a hard coded number/setting, and the real AzureConfigurationManager will actually call Azure.
The trick is to use the Web.Debug.Config and Web.Prod.Config files (or perhaps just use the #IF DEBUG C# precompiler statement) to change the implementation depending on the build config.
I have just created a Azure project with an MVC Web Role and I was able to hit a breakpoint in a controller action without any issues. Some things to check:
Do you have a WebRole.cs file in your MVC project containing a class derived from RoleEntryPoint?
Is there a node in the Roles folder of the Azure project representing your MVC project?
When you run the Azure project does the Compute and Storage emulator icon show up in the Notification Area of the taskbar?
Does the ServiceDefinition.csdef file in your Azure project contain a Web Role node with an attribute matching your MVC project name?
WebRole name="MvcWebRole1" vmsize="Small"
As a quick test try creating a new Azure project with a MVC Web Role, add a controller with a single action that returns a view and put a breakpoint in there. Then set your Azure project as the "Startup Project". If everything is working correctly you should hit the breakpoint when you debug the Azure project.
I un-installed and re-installed all my Azure SDK's, to no avail.
This link
Debugging Azure: Error attaching the debugger to the IIS worker proccess
told me where to look for the error that was causing it to fail, which led me to this link:
http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/07fe087e-4ac3-4c4f-bd62-4fccff4afd45
The ACL on the Windows Azure registry entries were not in "canonical order".
All you have to do is fix that and this error goes away.
These are the steps I took:
1.) regedit, navigate to HKLM\Software\Microsoft\Windows\Windows Azure
2.) Right-click, choose "Permissions". You will get a warning that the
security information is incorrect and you get a button labelled "Re-Order".
Click this and the security information then shows up as normal.
3.) Follow the same steps for the Windows Azure AppFabric and Windows Azure Emulator
registry entries in the list after the Windows Azure entry.
Problem Solved!
Note that I found the key under HKLM\Software\Microsoft\Windows Azure, not under Windows\Windows Azure.

Manually Assigning WCF Application in IIS

In a Visual Studio "WCF Service Application" project, on the properties->web page, if I select "Use Local IIS Web Server"->"create virtual directory"...it creates the IIS application successfully in the Default Web Site of a local IIS 7.5 install. So far so good.
However, I'd like to use a site other than the default web site. My attempts to host the service in a different web site aren't working. I tried:
Delete the application / virtual directory in IIS that Visual Studio successfully created.
Manually create a new IIS application, in the different web site, using the same settings that were present in the IIS application previously created by Visual Studio automatically.
Go to Visual Studio, project properties->web, and select the "visual studio development server". Save. This is just an "erase" step.
On the same properties page, I select "Use Local IIS Web Server" again and hit save (without pressing "Create Virtual Directory").
In that last step, I expect it to save. It doesn't. It pops up a message saying the virtual directory does not exist. But as I stated, it does exist because I had manually created it just prior.
My own guesses about this problem:
*. The non-default site I've made is somehow different from the default web site, in a way I've yet to determine.
*. Visual Studio is not designed to work with a virtual directory that is not in the default web site.
Any suggestions or clarifications?
I've activated IIS "failed request tracing," but no records are created for this issue.
What you want to do is look at your second site is IIS (the one you want the WCF service to run under) and look at the host name on new or if you go to manage web site -> advanced settings and look at what is after the the bindings. So it may show something like: http:*:80:localhost2 . localhost2 is what you need. It may be an IP Address too, not sure how you set it up.
So then in your WCF project properties in the Use Local IIS Server -> Project URL you put the host name of the site. So for example it may be something like: http://localhost2/yourservice.svc .

"Unable to connect to the ASP.NET Development Server" message in Visual Studio 2010

I just checked out an ASP.NET MVC 3 web project using TortoiseSVN. I opened it in vs2010 and successfully built it. But when I try to run the project, vs2010 gives me an error with the following message "Unable to connect to the ASP.NET Development Server". When I open the development server dialog via icon in notification area and try to browse through the link in this dialog a web page opens with "HTTP Error 403 - Forbidden".
This looks quite odd, as when I create a new MVC project in the same solution and try to run it, it runs normally. This problem occurs only with the aforementioned project.
Please share any ideas.
This worked for me:
Open web.config
Remove everything in the <system.web> section
Run the project (it should work now)
Undo your web.config changes and you should be good to go.
Try to change assigned port in project properties-> Web-> set specific port instead of auto assign.

Can't add web service project to solution in Visual Studios 2010

I have a web service that Visual Studio just won't let me add to my solution.
If I right click on the solution, click Add, then Existing Project, then I navigate to my project, select the Visual C# Project file, I get "The local IIS URL http://127.0.0.1:8099/ specified for web project has not been configured.
It asks if I would like to create the virtual directory now.
If I choose no, nothing happens
If I choose yes, creation failed error, could not find the server http://127.0.0.1:8099 on the local machine.
Creating a virtual directory is only supported on the local IIS server.
Does anybody know how to fix this? I've been struggling with it for a while. Thanks

Resources