I got a new computer and I'm trying to publish my website through web deploy in Visual Studio from the new computer but it keeps saying failed due to unauthorized user. I'm using the same visual studio account, the same password. Everything else is identical to what it looks like in the old computer.
Is there something on the azure website that I need to update to allow a new computer to publish? Is the password different from the username/password I login to get into azure portal? There seem to be a lot more **** in my old computer's password input than what's required. I just assumed that it at some point did that for security purposes.
This is the error I get when going to Settings in the publishing window in Visual Studio and when I click Validate Connection:
Connect to the remote computer ("website name" using the Web
Management Service, but could not authorize. Make sure that you are
using the correct user name and password, that the site you are
connecting to exists, and the credentials represent a user who has
permissions to access the site. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
The remote server returned an error: (401) Unauthorized.
Is there something on the azure website that I need to update to allow a new computer to publish?
No.
Is the password different from the username/password I login to get into azure portal?
Its not different. Its the same.
I have noticed that sometimes, even with everything being correct from our side, VS web deploy to Azure simply may not work. It could a simple connection issue from VS to Azure, in terms of authentication and no fault of yours.
I don't know why VS is giving authentication error, but as an alternative, you could, deploy your site locally to a folder in Visual Studio. Then, deploy the site manually to your site via FTP.
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-deploy
In the long run, you will come to trust FTP deploy than VS deploy which is simply too much of a hassle.
Related
Need your help on this.I'm a newbie to the C# visual studio domain.
I was going over the tutorial on Microsoft site to create App and deploy on Azure. Here is the link below:
https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/
After completing every single step .I have this annoying error message that keeps popping up whenever I try to access/ login-in - by using the google account or using the default user name and password on the site. Screenshot here
I've gone line by line checking my steps and codes ;my azure server, app and database is running perfectly. Google API and app is running - no errors.
On my local machine it is works fine. But, when I publish the code to Azure - the home page comes up and I can navigate to the login page but - I just can't login-in using the google AuthOut nor the default login page using the default credentials on line.
For the life of me - can't understand why its not working. Need help people.
The error means that your site is trying to talk to your database (SQL Server) but it can't connect to it. You probably don't have a SQL server database setup.
Look at step 11 in the instructions:
11.Select Create new server, enter a server name, user name, and password.
I'm guessing that you didn't create the database when you were creating your web app.
I created a new Azure Mobile App and set up my Sql Server database with it. I use an email address as the username, and then assigned a password.
Once the Mobile App and the Sql Server db setup completed, I was able to get my iOS app to target it and use the Azure authentication services without any issue. I then inserted some data in to a table in the iOS app, without any errors.
Now, I want to open the database and verify the data. Anytime I try to connect to the server using SSMS or Visual Studio 2015, I am told that the login failed.
I use an email address like Johnathon#MyCompany.com. When the sign-in fails, it says:
Login failed for user 'Johnathon'.
Is it the email address for a login causing issues? My ISP blocks port 1433, so I thought that maybe that was the issue initially. So instead of using VS or SSMS, I moved to the web-designer on the Azure portal. When I sign in there, I receive the same error. This has occured across three different App Services setups. I tried using the older Mobile Services, and had this issue. I then moved to the newly released Mobile App Service but have the same issue. Each time I deleted the database and recreated it and the server.
I have also added my client IP to the azure sql server firewall.
I'm at a loss at this point.
Update
I have managed to sign in to the server within the Azure portal designer by omitting the database name. However, when I select the Design option, and then click the Design button on the database, I receive a Failed to create context error. I assume this is related to why I can't connect to the server when I specify a database name in the Azure portal.
As a note, having the # symbol in the SQL Azure login tends to cause a number of headaches and it is not recommended to have it in there. What you will notice is that SSMS and other applications try to use it as part of the server name which then causes context and other failures.
The easiest fix for this is to roll up another SQL Azure server with a login name that doesn't use the # symbol, you will have a better experience overall.
I'm having a pretty strange issue with Azure tools for VS 2013 (version 2.6). Whenever I try to sign in to my Azure subscription (e.g. from Server explorer or creating a new web role project) I get the following error:
Server Explorer
An error occurred during the sign in process: User 'foo#gmail.com' returned by service does not match user 'bar#outlook.com' in the request
OK
My subscription owned by 'bar#outlook.com' and I can perfectly fine sign in either to management portal in a browser (IE, Spartan and Chrome) - as well as in the Power Shell. Tried everything - cleaning up browser caches/cookies, resetting IE settings, playing with different IE security settings - nothign works.
Any help is appreciated - this issue drives me crazy.
P.S. I'm on Windows 10...
I had the same problem. Imported the certificate manually and everything worked ok: https://social.technet.microsoft.com/Forums/en-US/9cdafeb4-f459-436d-b2b8-9bc5c01f0df1/azure-tools-for-vs-cant-sign-in-to-subscription?forum=windowsazuredevelopment
I had this issue, to resolve it I:
Added 'foo#gmail.com' as an alias in my 'bar#outlook.com' Microsoft account, via account.live.com
Made the 'foo#gmail.com' email address the primary alias for my Microsoft account
I could then log in successfully in to Azure by pressing the Connect to Microsoft Azure button in the toolbar of the Server Explorer in Visual Studio 2013 and see all of my websites under the App Service node.
(When I'd used the certificate method described in the other post and Microsoft documentation I'd been able to see all my sql databases etc. but not the websites.)
Once I'd done all that I then switched my primary alias back to 'bar#outlook.com' and server explorer carried on working.
NB: If you're experimenting with this beware that there is a limit on how many times you can switch your primary.. as I have just discovered.. and now my primary is stuck on the wrong email address for a week.
NB2: If your connecting in order to be able to remote debug the website, then this can still be done by going to Visual Studio>Main Menu>Debug>Attach To Process, and then enter the URL of the site (without the http bit, e.g. mysite.azurewebsites.net) as the Qualifier and then attach to the w3wp.exe process.
I am having the exact same issue. It seems that the Azure sign-in in Visual Studio is redirecting to our organizational Single Sign-On instead of the Microsoft one. I have managed to work around this problem by using a Microsoft account that is not tied to my organization:
Create new Microsoft account or use an existing account not associated with your organization
In https://manage.windowsazure.com select Subscriptions/Manage Administrators
Choose Add+ and add the new Microsoft account as administrator to your subscription
Log on to Azure using the new account from Visual Studio
/Morten
I changed my Microsoft account's email address and had this problem. Adding an alias did not help.
The problem is to do with the Azure Active Directory Library for DotNet. For whatever dumb reason, they throw an exception when Azure returns an ID different than the one requested (if the server isn't crying about it, why make up an error and make the client deal with it?).
Since Azures's support was no help, I had to build a custom copy of the ADAL with that moronic exception removed and an assembly version matching the one used in VS2013 (2.11). Also importantly, disable strong name verification for the custom assembly.
I have an app deployed to Azure and it uses ADFS (Active Directory Federated Services) for authentication.
When the user tries to navigate to the app on Azure, it redirects the user to the ADFS authentication page. User enters their credentials and clicks OK, and ADFS redirects the user to the landing page of my app.
Everything is working fine up to this point. I'm getting a generic server error on the app once the user hits the landing page. PROBLEM: I need to see the detailed errors. I try setting <customErrors="off" />, repackage my app and redeploy, but that doesn't give me detailed errors:
Here's what I've tried: I've tried packaging my app in Debug mode (after Release mode didn't work), I've edited both web.config's (in the root of the solution, as well as in the Views folder, just to cover all bases). Nothing worked.
What am I doing wrong?
A couple of things to try:
Are you SURE the customerErrors attribute is set correctly? The
Identity and Access tooling in Visual Studio seems to like to reset
that back to "Off" (every time you update via the tool).
Are you able to connect to the role instance via Remote Desktop? If
so, you could inspect the web.config settings for the site?
Browsing to the site from the server might also provide a more
friendly error message.
When you RDP into the cloud service, you can look at the Event
Viewer to see the detailed error messages.
I fixed this error by ftp'ing into my azure website and deleting the wwwroot folder and then publishing my website via visual studio.
I have created a Cloud project on VS 2012 with .net 4.5. This consists of two web roles, an API and an front end website.
I have followed the instructions here: http://msdn.microsoft.com/en-gb/library/windowsazure/gg443832.aspx in order to set up remote desktop, and deployed the service.
When I try to connect (I have double and triple checked the credentials), I get told that 'The credentials that were used to connect to did not work. Please enter new credentials.
My web roles are both operational, and I can visit them both in the browser.
I have tried waiting a while after deploying for changes to propagate, but this makes no difference. The only thing I can think of is that I have not done anything with certificates as of yet other than download the appropriate bits in order to deploy from visual studio. I can't find any documentation that says I need to though.
I have also tried out adding various domains to the username but nothing works.
Am I missing something, or is there a chance that there is a bug with azure at the moment?
EDIT: Have now tried deleting the cloud project from visual studio, deleting the cloud service in azure and redeploying with only a single web role. Still seeing the problem.
Just checking for completeness,
Did you use the button on the website for your first access?
http://blogs.msdn.com/b/avkashchauhan/archive/2011/04/03/how-to-login-into-windows-azure-virtual-machine-using-remote-desktop.aspx
On the other hand, this is the link that worked for us, it includes how to set up the cert needed too.
http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/03/connect-to-running-web-role-from-remote-desktop-connection-and.aspx
I fixed this by removing the <Import moduleName="RemoteAccess" /> and <Import moduleName="RemoteForwarder" /> lines from the .csdef then removing all references to Microsoft.WindowsAzure.Plugins.RemoteAccess and Microsoft.WindowsAzure.Plugins.RemoteForwarder within the .cscfg files. I then was able to deploy and enable remote desktop access from the newer Azure portal.
After adding users to the Azure Active Directory Domain, (e.g. smith#mydomain.onmicorosft.com), I tried logging in as one of those users, but got "Your credentials did not work." After some trial and error, I found that I had to add the users (e.g. smith) as local users on the VMs. Once I did that, and assigned, passwords, the users could RDP in.