Can't add web service project to solution in Visual Studios 2010 - visual-studio-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

Related

Not Working: Add a Project to Team Foundation Server 2012 using Visual Studio 2015

I am trying to add new projects to the Team Foundation Server and every way I have tried to add them has failed. We are running TFS 2012 Version: 11.0.50727.1 (RTM) and I am running Visual Studio 2015. I am a member of the Administrators Group.
I have tried at least 3 ways that MS support says how to do it on the website and none of them have worked:
I have tried to add it through Visual Studio
I have tried to add it through the Team Foundation Server Administration Console on the Server.
I have tried to add it through the TFS Web Management Portal.
When I try to add it through Visual Studio, I get an error when trying to check it in. It shows on the Source Control Explorer with a pending change of 'Add'. Here is a screenshot of the team explorer and output:
Since the message tells me to add it to the server, I opened the TFS Server Admin Console and When I go into the Team Projects Tab under Team Project Collections, it lists the existing projects, however, there is no way to add a new project. Here is a screenshot of the Admin Console:
There is only a help icon with a link on How to add a Team Project, although like with most MS help articles, it is useless. It provides information about how to do it on the web. So I tried it. I accessed the web portal for our TFS server and there isn't any option to add a project there either. When I go in to the "View the collection administration page" It tells me "Not all Collection level administration is exposed in the web experience. For all administration operations at the collection level please use the Administration Console on your Team Foundation Server.". Here is a screenshot of the online portal:
Can someone please help me with this issue? How can I add the projects to the Team Foundation Server?
I figured out how to Add the projects to the Team Foundation Server using Visual Studio 2015. It is very simple and can be done right from the File Menu in Visual Studio.
First open Visual Studio 2015. (I am not sure if it works the same in other versions.)
Go to File -> New -> Team Project...
The New Team Project Wizard will popup where you can then enter the project name and project description.
Then you can choose the template type and whether you will be using TFS Version Control or Git Distributed Version Control.
Once you click Finish, the Project will be added to TFS.
You can then add the files to the workspace folder on your dev machine.
Then you can check the files into TFS using the Team Explorer. *Note: First, you may need to add the files to the project by going to the Solution Control Explorer and right clicking on the newly created project and selecting Add Items to Folder. From there you can add the files then check them in using the Team Explorer.
Please clarify you want to create a code project/solution and add it to a TeamProject, or you want to create a TeamProject. TeamProject and code project/solution are different.
If you want to create a new TeamProject, according to Client compatibility, TFS 2012 supports VS 2015 RTM or latest update. Check your VS 2015 edition and re-try to create a TeamProject.
If you want to add a code project/solution to a TeamProject, you'll have to connect a TeamProject first and create a workspace, then perform a check-in: https://www.visualstudio.com/en-us/docs/tfvc/set-up-team-foundation-version-control-your-dev-machine
Last, try to clean the Cache folder on your dev computer. The folder path is: C:\Users\username\AppData\Local\Microsoft\Team Foundation\4.0\Cache.
If none of above works, try on another dev machine to see whether you can reproduce this issue.

How to deploy a Web API to my web host?

I'm building a RESTful Web API on my local machine and it works nicely. I want to put it on my GoDaddy web host account now. I did this once by copy and paste file by file to the FTP site they gave me. That worked, but it is slow and painful to do and to update when I make changes. Is there a quicker way to publish (in Visual Studio) from my local copy to my FTP site? If not, can you tell me which files I need to deploy for the Web API to work? I don't think it needs all the .cs files, but I'm not sure what files it must have.
OK, I found this link about publishing a website in Visual Studio:
https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k%28WebApplicationProjects.PackagePublishOverview%29;k%28TargetFrameworkMoniker-.NETFramework
It didn't really solve everything for me, but I started playing around with the controls in Visual Studio. I was able to publish my local website to FTP by right-clicking on the project node in Server Explorer and click Publish... or click Build -> Publish in the Visual Studio menu. Fill in your FTP connection information, enter the target folder under Site Path and leave Destination URL blank (don't know, don't care). I also unchecked "Include all databases..." in the Project Properties Page for Package/Publish Web because I didn't want to rebuild my destination database. It worked.

Visual Studio Configuraiton manager Deploy column disabled

I am having a problem with the configuration manager in Visual Studio 2013. The Deploy column is disabled no. The only thing I did was a Repair of Visual Studio 2013 and not my WebAPI project not longer has the Deploy option enabled in Configuration Manager. I used to be able to do a file system deploy to the folder on the Web Server that hosted my WebAPI process. I am not sure what is going on. Any assistance would be greatly appreciated.
FYI - The CGSAPI project type is class library but that is what it has always been.
OK so I was just being silly. I have to right mouse button click on the actual WebAPI project and Publish will be available in the dropdown list. :)

Every time I open my project I have to create virtual directories

I am currently working on a solution which has an ASP.NET application and a Web Service. Whenever I open this solution I get the message that the virtual directories for this project have not yet been created and must be to continue. The problem is, if I hit OK, it cannot create the directories because they already exist and then I cannot load the project. Looking in IIS I can see that the virtual directory exists in C:/Inetpub/wwwroot/ProjName. If I delete this from IIS, I can then open the project, but it creates the virtual directory in C:/location of project folder. When it uses the project's location, I am not able to connect to the site or the web service.
The same thing happens on XP with IIS 5.1, VS 2010 and Server 2003 with IIS 6.0, VS 2010. Similarly, it happens on colleague's machines, so I am convinced that it is a setting in VS, and not IIS or my machine.
Right now, my solution is to delete the virtual directories, open the VS solution, delete the virtual directories, and publish the projects with the publish toolbar in visual studio (not the web tab in project properties).
I fear that I've at some point messed up a setting on both of the projects, but it has been some time since I've been working around this. I've scoured all of the settings and I can't find anything that fixes this behaviour. I need to pass the project along to someone else, and I feel as if the work around instructions may be confusing so I want to fix this.
I used to do things similarly back in the days when VS didn't have its own dev server - re: directly work on web projects in a local version of IIS (if memory serves, this was called "Personal Web Server" or PWS - am I advertising my age?)
Anyway, I haven't (thankfully) done that since VS (2005?) got its own dev server...
Try this process in VS 2010:
You can develop your solution on any local folder in your file system. You can run/debug your solution from VS (ctrl f5 or f5 respectively) - it will use VS dev server by default. Your development machine doesn't even need to have IIS...
After you are done developing and debugging (using VS and its dev server), you can publish to IIS or even to some other "publish folder" in your (local) file system, and simply copy the files to whatever (local/remote) IIS virtual (ASP.NET application) folder you prefer.

VS2010 Error in Recycling IIS Application Pool: Not Found

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.

Resources