How to host ASMX from Visual Studios on IIS? - visual-studio

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

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.

Visual Studio 2010 change from localhost to full computer name/domain

I am using Visual Studio 2010 and I would like change debugging environment from the localhost to my full computer name/domain. Does anyone have some step by step instructions on how to do this? (I would also like to set it up as the default for all new projects plus how to change it in existing projects). I am new to using visual studio and programming in general.
I found this post Visual Studio 2010 - Change localhost to custom domain in the forum but it wasn't clear to me on how to make the change. I went to the project properties web tab and attempted to set up local IIS Web server but got the following error:
"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."
I am not ever sure if that was the correct way of going about doing this. I just need my debug url address to go from:
"http://localhost:53674/Projectname.aspx"
to:
"http://computername.pag-domain.webname.org/Projectname.aspx"
Thanks!
For fixing the iis web server, I am not really sure what was done...our IT department worked on that. For setting up the local IIS webserver in visual studio I did the following: In the web project properties, under the web tab, I choose "Use Local IIS Web server, in the project URL, I put the full computer domain and told it to create a virtual directory.
Got it. Our IT came to the rescue — he fixed some issues with the ASP.NET not accessing 4.0 correctly. Then I set up the "Use Local IIS Web server" correctly and it worked like a charm.

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.

How to configure a published package as a website in IIS

I want to auto publish the sites using teamcity. I am using teamcity's Visual studio to publish a website. It creates a pre-compiled web directory as following
D:\publish\PrecompiledWeb\Books in the checkout directory.
Now I need to use it with IIS. If I point the IIS to that directory It gives the following error
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Any Idea what I am doing wrong.
I'm not entirely clear on the steps you're taking from your question, but it looks like your ultimate goal is to use TeamCity to create a deployable package and publish that to IIS. Your best bet is to do this using WebDeploy and fire it off from a Visual Studio build runner in TeamCity with appropriate parameters. There's a step-by-step guide to doing this in the You're deploying it wrong series.

Resources