无法尽管Azure中复制连接字符串授权 [英] Unable to authorize despite connection string copied from Azure

查看:126
本文介绍了无法尽管Azure中复制连接字符串授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Azure中托管的网站。这是一种香草MVC项目,但是当我尝试注册我如下得到一个错误的用户。

I have a site hosted in Azure. It's a vanilla MVC project but when I try to register a user I'm getting an error as follows.

异常详细信息:System.Data.SqlClient.SqlException:用户登录失败BeepBeep

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'BeepBeep'.

我不知道为什么它给我的错误。在配置文件中的连接字符串看起来像这样(修改凭证,当然)。

I'm not sure why it's giving me the error. The connection string in the config files looks like this (change credentials, of course).

<add name="DefaultConnection"
     connectionString="
       Server=tcp:f8goq0bvq7.database.windows.net,1433;
       Database=MyDataBase;
       User ID=BeepBeep@f8goq0bvq7;
       Password=Bzzzz;
       Encrypt=True;
       TrustServerCertificate=False;
       Connection Timeout=30;"
     providerName="System.Data.SqlClient"/>

我已经验证使用SQL Management Studio中相同的凭据,我得到登录。也许,授权不要求数据库凭据(虽然试图通过注册默认香草MVC网站的新用户发生错误) 。不知道在哪里捅它,虽然。

I've verified the same credentials with SQL Management Studio and I get logged in. Possibly, the authorization doesn't ask for DB credentials (although the error occurs while trying to register a new user via the default vanilla MVC site). Not sure where to poke it, though.

如何麻烦拍摄呢?任何想法

Any ideas on how to trouble-shoot it?

根据的评论,我们验证数据库设置为接受来自Azure服务,并在防火墙中孔跨度从0.0.0.0到255.255.255.255调用。我们也确信的凭据是在在Azure门户正确指定(使用它们,以及上载的配置文件相同的结果)。

Based on the comments, we've verified that the database is set up to accept calls from Azure Services and that the hole in the firewall spans from 0.0.0.0 to 255.255.255.255. We also made sure that the credentials were correctly specified in the Azure portal (same result using them as well as the upload config file).

推荐答案

你从哪里得到的连接字符串?

Where did you get the connection string?

您可以检查是否有{}在你的密码?

Can you check if it has {} around your password?

<add name="DefaultConnection" connectionString="Server=tcp:myserver.database.windows.net;Database=aspnet-WebApplication1-20140927090028;User ID=myid;Password={mypsw};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" providerName="System.Data.SqlClient" />

如果是的,从大约密码删除{} ...

If yes, remove the {} from around your password...

或者

您能查看下连接字符串部分在Azure门户网站,看你有没有正确的密码有

Can you check the Azure portal under Connection string section and see you have the correct password there

或者在新的Azure门户网站,它看起来是这样的:

Or in the new Azure portal it looks like this:


  1. 选择您的网站

  2. 单击应用程序设置

  3. 转到连接字符串部分,编辑密码

在这里输入的形象描述

下面是新的门户网站为SQL Server设置防火墙设置:

Here is firewall setting in new portal for the SQL Server setting:

在这里输入的形象描述

这篇关于无法尽管Azure中复制连接字符串授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆