Can't connect to the SharePoint site: - visual-studio-2010

I started VS with admin rights, i'm currently in trouble setting up a SharePoint 2010 project.
Today, I installed VS2010 on our new SP 2010 server
But now I'm failing to create a SharePoint project in Visual Studio. The SharePoint Customization Wizard tells me following:
Cannont connect to the SharePoint site: http://myserver/blah. Make sure that the Site URL is valid, that the SharePoint site is running on the local computer, and that the current user as the necessary permissions to access the site.
As I'm 'quite' sure, that SharePoint is running on the locale system and I'm having no problems browsing SharePoint with my account, I'm wondering what is preventing me to create the project.
Somewhere else I've read that the user, which is running VS2010, needs db_owner rights to the config and admin tables of SP2010, which I've done, unfortunately this didn't affect anything.
Has anybody encountered this problem before? Thanks for any help!

The URL in the Configuration Wizard needs to be an available SharePoint site so it can deploy the project output. Try to navigate to this url in a browser or go to an existing SP site and use that url in the Customization Wizard.

Add the user account to SQL Server as sysadmin

See: Cannot connect to the Sharepoint Site from Visual Studio 2010
This issue can be fixed by doing the following :-
1.
Added myself as the administrator
2.
Added myself to SharePoint Farm Admin Group
3.
Provided DB Owner access to SharePoint Content DB

Add Visual studio process user to the db owners group for sharepoint databases

Related

Advice on creating a local instance of Azure Website

I have, I admit, done things the wrong way round and created an Umbraco installation on Azure, developed multiple websites on that installation and only just decided I want a local instance for further development purposes.
Given that that's where I am, does anyone have any advice for how to go about achieving this? I have tried installing Visual Studio Community 2017 and MS SQL Server 2017 Developer and while I can connect to Azure with Visual Studio I don't seem to be able to work out how to view the installation, much less copy it down to my PC (something which I my searches seem to suggest isn't possible with Visual Studio).
I think you will need to copy down the site via FTP and the database using SQL Server Management Tools (assuming you are using SQL Server and not SQL CE).
You can get the FTP connection information from the Azure portal. The web root is in /site/wwwroot. Copy it down locally and you will be able to open it in Visual Studio as a Web Site. For the database, you can connect to the Azure SQL database with SQL Server Management Tools (you should have the connection info from when you created the database) and then right click on the database, select "Tasks" > "Export Data-tier application..." which will allow you to save a 'bacpac' file your local machine. You can then connect to your local SQL Server instance, and then right click on the "Databases" node in the Object Explorer and select "Import Data-tier application..." Once the database is imported, you may need to create/update a SQL Server user and grant it access to the database you just imported. For local development I just set the user to be owner of the the db. Back in Visual Studio, you should update the "umbracoDbDSN" connection string to use the new local database. At this point you should be able to run the website locally.

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.

Sharepoint customization wizard - can't deploy as a farm solution

Whenever I try to connect with the url (Sharepoint customization wizard, with option deploy as a farm solution) of the solution after creating a new sharepoint 2010 solution with the VS 2010 ultimate and I can't connect it, but I can access it in the browser.
I am running visual studio as administrator.
It gives me the error:
"Cannot connect to the Sharepoint site: [site name].org.br.
Make sure that the Site URL is valid, that the SharePoint site is running on the local computer, and that the current user as the necessary permissions to access the site.
Additional Information:
It is working without need to making package, automattically, (just pressing F5) on the localhost, but is not working in the network intranet solution.
Cannot connect to the Sharepoint site: [site name].org.br.
Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project."
Maybe it is required to use the Visual Studio Team Foundation Server to be able to make it to work.
EDIT: Was an error with the anti-virus at the network.
Now I can connect to the project, but cant deploy.
Now I have a problem when deploying it, it gives me a new error.
Recycle the IIS application pool:
Error occurred in deployment step 'Recycle IIS Application Pool': Cannot connect to the SharePoint site: http://[website]. Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project.

"User does not exist or is not unique" error when creating Team Project in Team Foundation Server

I have SharePoint 2010 and Team Foundation Server 2012 installed on the same system.
SharePoint site collection for TFS projects: http://tfsserver/sites/TFS
When I try to create a new team project in Visual Studio 2012, it fails with the following:
Error TF218017 seems to pertain to permissions. The sites/TFS collection in SharePoint has my user account listed with full access. Going to the TFS security administration page, I am in the "Project Collection Administrators" group.
I have researched the "User does not exist or is not unique" issue, and all signs point to it being an issue with the fact that TFS does not work with Claims based authentication in SharePoint; however, the SharePoint application is configured with Windows (Classic) authentication.
Any idea what my problem could be?

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