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

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.

Related

How to host ASMX from Visual Studios on IIS?

I've created a web service in Visual Studios fully functional as I've been able to test it through localhost. I've attempted to publish it from visual studios following a few random guides but each time I try it I keep getting errors.
This is my most recent error.
Error 3 Web deployment task failed. (The specified credentials cannot be used with the authentication scheme 'Basic'.)
The specified credentials cannot be used with the authentication scheme 'Basic'.
Default credentials cannot be supplied for the Basic authentication scheme.
Parameter name: authType 0 0 RacoCS
My previous error was in reference to the URL I would try to publish it.
Which publication method are you trying to use. Visual Studio let you publish your web apps in various ways. The less likely to have problems is to file system and then manually create a web site in IIS pointing to the directory where the publication files are. Good luck

Debugging Azure - An error occurred loading a configuration file

I can debug my application fine but if I debug the Azure project, it loads the compute and storage emulators, loads the browser and goes to 127.0.0.1:81 and then I get the error:
Description: An error occurred during the processing of a
configuration file required to service this request. Please review the
specific error details below and modify your configuration file
appropriately.
Parser Error Message: An error occurred loading a configuration file:
Access to the path 'C:\Users\Projects\Web\views\web.config' is denied.
I am using November 2011 Azure SDK and Visual Studio 2010 SP1 in admin mode with IIS7.
If I publish the website to Azure then everything works fine, it's just a debugging issue.
EDIT
Ah, it needs to be running under C:\inetpub\wwwroot to debug the Azure project. How can I get it to work outside of that directory?
Windows Azure does not change anything with respect your ASP.NET configuration instead it just use the same ASP.NET application and configuration to run your application in compute emulator. So when you run your application in compute emulator the whole ASP.NET project runs from the same folder where your application was and in IIS you can verify as the image below:
I am very much suspecting that by any reason the folder/file is read only that's why web.config is not accessible. I believe you should investigate this problem from your drive/files security and accessing point not from ASP.NET/Azure perspective because I dont see any error over there..
When debugging the web project I was using Cassini. When debugging Azure it uses IIS.
I had to add the user account of NETWORK SERVICE to my solution files.
To access the local database when debugging Azure locally, the database needs the user NETWORK SERVICE adding to it.
If you have source control, I think there is sometimes an error if the web.config file has the readonly attribute set on it in the file system. I'd check there first.

Debugging an existing sharepoint solution

I've recently mapped a sharepoint solution from TFS to a local directory and successfully 'got' the latest version.
It wasn't building, but this was because of there were no Site URL's in the properties of the several projects included in the solution. So, using central admin, I created a new web app (the port 36352). U then added the url and port to the Site Url and it's now building fine.
However, when I go to run with the debugger I get the following two errors:
Error 2 Error occurred in deployment step 'Recycle IIS Application Pool': Cannot connect to the SharePoint site: :36352/">http://:36352/ (deleted url for security reasons). 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.
AND
Error 3 Program 'Path.PowerShell.exe' (deleted path for security reasons) does not contain a static 'Main' method suitable for an entry point
It seems that the first error is related to the way in which I've 'connected' it to the new web app I've created - have I done this part right?
The 2nd error seems to be with regard to the entry point at which the debugger should execute, but this is a sharepoint site - so I just want to run the site (has VS not identified this as sharepoint somehow?).
Thanks a LOT for any help.
I got this exception when I had the solution on a different server. Make sure your solution is on the same server as the SharePoint web application. When you run the solution, Visual studio packages the solution and tries to deploy it onto the URL you specified in the properties. If your project is a farm solutions such as visual web part then make sure you have rights to deploy.

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.

Can't connect to the SharePoint site:

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

Resources