Azure Sql connection from azure website not working

I'm have the following connection problem when connecting to the website is deployed to azure. The site work locally when connecting to Azure Sql using the same account. The site is MVC 4 EF 5.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Here is my web.config.
<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <connectionStrings>
    <add name="MyWhesEntities" connectionString="metadata=res://*/MyWhesModel.csdl|res://*/MyWhesModel.ssdl|res://*/MyWhesModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=localhost;initial catalog=mywhes;integrated
security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    <add name="MyWhesContext" connectionString="tcp:ngw4ziez6g.database.windows.net,1433;Database=mywhes;UserID=********;Password=********;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <appSettings>
    <add key="webpages:Version" value="2.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    <add key="enableSimpleMembership" value="false" />
    <add key="autoFormsAuthentication" value="false" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
    </compilation>
    <httpRuntime />
    <machineKey />
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login" timeout="2880" />
    </authentication>
    <pages controlRenderingCompatibilityVersion="4.0">
      <namespaces>
        <add namespace="System.Web.Helpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Optimization" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.WebPages" />
      </namespaces>
    </pages>
    <membership defaultProvider="WhesMembershipProvider">
      <providers>
        <clear />
        <add name="WhesMembershipProvider" type="MyWhes.Helpers.WhesMembershipProvider" connectionStringName="MyWhesContext" />
      </providers>
    </membership>
    <profile>
      <providers>
        <clear />
      </providers>
    </profile>
    <roleManager defaultProvider="WhesRoleProvider" enabled="true" cacheRolesInCookie="true">
      <providers>
        <clear />
        <add name="WhesRoleProvider" type="MyWhes.Helpers.WhesRoleProvider" connectionStringName="MyWhesContext" />
      </providers>
    </roleManager>
    <sessionState mode="InProc" customProvider="DefaultSessionProvider">
      <providers>
        <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
      </providers>
    </sessionState>
    <customErrors mode="Off"></customErrors>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
  </entityFramework>
</configuration>
    

  <connectionStrings>
    <add name="MyWhesEntities" connectionString="metadata=res://*/MyWhesModel.csdl|res://*/MyWhesModel.ssdl|res://*/MyWhesModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data
source=localhost;initial catalog=mywhes;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    <add name="MyWhesContext" connectionString="tcp:ngw4ziez6g.database.windows.net,1433;Database=mywhes;UserID=********;Password=********;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" providerName="System.Data.SqlClient"
/>
  </connectionStrings>     
Hello James,
Your Entity Framework Model "MyWhesEntities" connection string is still pointing to a local server, not to SQL Azure; or do you change it during runtime in your code?
And you should add the "data source=" property name to your second connection string, it's missing.
Olaf Helper
* cogito ergo sum * errare humanum est * quote erat demonstrandum *
Wenn ich denke, ist das ein Fehler und das beweise ich täglich
Blog
Xing

Similar Messages

  • Using AzureContinuousDeployment.11.xaml template to deploy to Azure Website not working

    I have a visual studio online account and have set up continuous deployment using the AzureContinuousDeployment.11.xaml and set the Azure Website property to my publish profile, however when the build is running, it complete but never deploys.
    If however, I use the TFVCContinousDeployment.12.xaml (http://azure.microsoft.com/en-us/documentation/articles/cloud-services-continuous-delivery-use-vso/)
    then it does deploy as expected.
    Any ideas?

      <connectionStrings>
        <add name="MyWhesEntities" connectionString="metadata=res://*/MyWhesModel.csdl|res://*/MyWhesModel.ssdl|res://*/MyWhesModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data
    source=localhost;initial catalog=mywhes;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
        <add name="MyWhesContext" connectionString="tcp:ngw4ziez6g.database.windows.net,1433;Database=mywhes;UserID=********;Password=********;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" providerName="System.Data.SqlClient"
    />
      </connectionStrings>     
    Hello James,
    Your Entity Framework Model "MyWhesEntities" connection string is still pointing to a local server, not to SQL Azure; or do you change it during runtime in your code?
    And you should add the "data source=" property name to your second connection string, it's missing.
    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog
    Xing

  • IIOP connection from JDeveloper does not work

    I'm trying to run some sample EJB programs but cannot connect to the IIOP port from JDeveloper. I have installed Oracle 8.1.7 Enterprise on my machine, and it includes a listening location for IIOP on port 2481 under the listener. I can connect to JServer on this database from DBA Studio using various user/passwords, so the IIOP connection seems to work in principle.
    But when I try to set up an IIOP connection from JDeveloper (v.3.1.1.2), the "Test" button fails to connect, but does not give any details on the reason for the error.
    I have tried using the command line utility sess_sh, but this fails telling me the URL is invalid, even though it is exactly the same as the URL I connected to in DBA Studio.
    Why can I connect from DBA Studio but not from JDeveloper, and can anyone tell me how to get this connection to work?
    (It shouldn't be this hard to get a simple "Hello world" EJB to work!)
    Thanks,
    Chris

    You must use Jdev 3.2.x to communicate with RDBMS 8.1.7.
    Jdev 3.1.x.x is for RDBMS 8.1.6.

  • Z77A-G43 drivers from MSI website not working

    Hi, I've just built a new computer on a Z77A-G43, running Windows 7 Ultimate 64-bit.
    Specs:
    i5-3570K
    8GBs of Corsair RAM
    MSI 7850
    120GB Intel 330 SSD - system
    1TB WD Green - secondary
    Instead of installing drivers from the supplied CD (except for ethernet drivers), I went to the MSI product page for my mobo for newer drivers. All goes well, except that I can't install the last driver I want - the Intel VGA driver for the GMA HD 4000 that's in my CPU. I read the readme, so I don't think I'm doing anything wrong. When I launch Setup.exe all I get is this error: "This computer does not meet the minimum requirements for installing the software." Running as admin doesn't change anything.
    I'm thinking it must be the wrong driver. I looked through Intel's site, but would like to get a tested option here from MSI. I read some other forums of people having similar problems, some can't even boot after installing. I don't want to get into that situation. Could MSI please update the drivers page with the correct drivers? This driver isn't on the mobo CD anyway, so it's the only way to get it from you guys.
    Btw, I also noticed the same problem with the Intel Rapid Start driver and I haven't tested the Intel Smart Connect driver. I'm not going to use either one of these, but it's worth noting.
    Edit:
    Found the VGA driver on the CD, but same result. Through the autorun MSI interface the VGA driver button in the Drivers menu is unclickable.

    I finally got around to installing the VGA drivers for the GMA HD 4000. You don't even need to unplug your discrete card (PEG), in BIOS just switch to initiate IGP and make sure you have an HDMI/DVI/DSUB plugged in to the monitor and scanning for input. If you go to the Windows device manager, you'll see the system is detecting a new graphics adapter. You can proceed with the installation of the drivers as they will now detect the IGP. Then one restart and you're done. Btw, after restarting, if you have your discrete card connected and monitor also plugged in, the video input may fall back to it, so don't panic if you hear the Windows start up sound and see a black screen.
    Unfortunately the G43 does not come with any support for Lucid Logix Virtu software, so that was my mistake, when I said I see it all in the BIOS earlier. In the BIOS, all you can do is switch between which graphics adapter you want to initiate and some memory size settings when multi-monitor is enabled in IGP mode. There aren't any d-Mode or i-Mode settings.
    Btw, how can I mark this as solved?

  • SQL Insert from "Select Query" Not Work when use Order By

    Hai every body...
    I have a problem with T-SQL. I use SQL Server 2012 Express with SP2 on Windows 7 32-bit SP1.
    This is the problem
    -- first, create table
    create table dtoth.tableA (
    id_data TINYINT PRIMARY KEY,
    kd_data VARCHAR(20),
    nm_data VARCHAR(200)
    -- then, insert values
    INSERT INTO dtoth.tableA VALUES (0,'100.001','KAS');
    INSERT INTO dtoth.tableA VALUES (1,'110.001','BANK');
    INSERT INTO dtoth.tableA VALUES (2,'120.001','PIUTANG DAGANG');
    INSERT INTO dtoth.tableA VALUES (3,'121.001','PIUTANG GIRO');
    INSERT INTO dtoth.tableA VALUES (4,'130.001','PERSEDIAAN BARANG DAGANGAN');
    -- then, i create a temporary table
    create table dtoth.temp_tableA (
    kd_data VARCHAR(20),
    nm_data VARCHAR(200)
    -- then, i create a store procedure to call data from temporary table
    CREATE procedure dtoth.report
    AS
    BEGIN
    DELETE FROM dtoth.temp_tableA;
    INSERT INTO dtoth.temp_tableA SELECT kd_data, nm_data FROM dtoth.tableA ORDER BY kd_data desc;
    SELECT * FROM dtoth.temp_tableA;
    END
    GO
    When i execute the the store procedure with
    EXEC dtoth.report;
    the result is not accurate like this (kd_data not sorted desc):
    I want the column "kd_data" sort descending because i use ORDER BY kd_data DESC in insert statement on the store procedure.
    By the way, if i execute code like :
    SELECT kd_data, nm_data FROM dtoth.tableA ORDER BY kd_data desc;
    the result is correct like this
    So, what solution for my code in the store procedure ?
    Thanks.

    to get the data sorted, you should order by in your select in the stored procedure
    sorting while inserting does not guarenatee order..
    remove the order by in insert statement and put that in the select statement
    so, your procedure should be 
    -- then, i create a store procedure to call data from temporary table
    CREATE procedure dtoth.report
    AS
    BEGIN
    DELETE FROM dtoth.temp_tableA;
    INSERT INTO dtoth.temp_tableA SELECT kd_data, nm_data FROM dtoth.tableA;
    SELECT * FROM dtoth.temp_tableA ORDER BY kd_data desc;
    END
    GO
    Hope it Helps!!

  • Since the last update yesterday to firefox 4.0.1 my program "asus security protect manager" doesn't work properly. That means, that the saved keys from several websites not remembered for lock in.

    since the last update yesterday to firefox 4.0.1 my program “asus security protect manager” doesn’t work properly. That means, that the saved keys from several websites not remembered for lock in.

    Sorry you are having problems. First of all try Fifrefox's safemode.
    *[[Troubleshoot Firefox issues using Safe Mode]]
    If that works post back for further advice.
    Next step, if safe mode did not work.
    <u>First: Try a clean install, <sub>(you have had a none standard version installed previously)</sub></u><br /> that involves deleting the program files. Then if necessary try troubleshooting by creating and using a clean empty Firefox profile.
    See
    * this recent post [/questions/940399#answer-377134]
    * http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall
    <u>Second: try a New Profile</u>
    *http://kb.mozillazine.org/Profile_Manager#Creating_a_new_profile
    * this will be an additional profile, it is still worth backing up any existing or currently working profile on a regular basis
    **[[Back up and restore information in Firefox profiles]]
    * Until you are absolutely confident about the repercussions I suggest
    ** always use an empty folder when creating a new profile
    ** never delete or rename profiles, just disable or remove shortcuts
    ** after creating a new test profile open it and check for any addons or plugins that may be have been included by default

  • Select * from tab is not working in oracle 10g

    select * from tab is not working in oracle 10g. But at the same time,
    select * from <<table>> is working.
    Please advise me.

    This works for me in 10.2.0.2
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select * from tab;
    TNAME                          TABTYPE            CLUSTERID
    LOAN_DETAIL                    TABLE
    PLAN_TABLE                     TABLE
    ...

  • USB connection with PC is not working after updating firefox OS 1.3 to 2.0 on my device. How to fix this?

    After updating OS 1.3 to 2.0 usb connection to PC is not working. I am using firefox os device Flame. I cannot share files with my PC. Please help me to fix this problem.

    ''Ralph Daub [[#answer-694088|said]]''
    <blockquote>
    Hi Raiyad Raad,
    I'm sorry to hear that you're having issues when connecting your Firefox OS device to the PC, after updating it from v1.3 to v2.0.
    Please ensure that USB Storage and Media Storage are activated.
    If you are still having issues after activating USB storage and restarting your device, please write back to us with the following information:
    * What is the model of your phone?
    * What is the OS version and Build ID found in the Device Information page? Please visit [https://support.mozilla.org/en-US/kb/how-do-i-find-what-version-firefox-os-i-have this link] if you need help finding the Build ID of your phone.
    * Please describe the steps you took to update your device.
    * Please provide the exact steps to reproduce the issue you are encountering.
    * How often do you encounter this issue?
    Please be sure to include as much detail as possible, including any websites that may exhibit this issue, and any error messages that you may be receiving, exactly as they appear. This will ensure that we have all the necessary information to investigate this behavior.
    - Ralph
    </blockquote>
    I've activated the USB storage and media on the phone. But still it's not working. I'm using T2mobile Flame and my OS version is 2.0. Build ID: 20141016183911
    I've written a blog about how I updated it here: http://raiyadraad.blogspot.com/2015/02/how-to-update-firefox-os-13-to-20-with.html
    I'm having this problem after updating to firefox OS 2.0

  • Intermittently iphone 6 and 6 plus is wifi connected but internet does not work.

    Hi,
    I have an issue where intermittently iphone 6 and 6 plus is wifi connected but internet does not work. iMessage works though.  Toggling the wifi setting clears
    the issue temporarily but it occurs again.  Running iOS 8.3 now.  This was the case on iOS 8.1 and 8.2 as well. 
    I have tried the typical troubleshooting steps (reboot/reset network settings/disabling location services for wifi/upgrade/etc)
    My router is an EA9200 router with 2.4 Ghz and 5 Ghz.  It is configured with all bands with the same name.
    All other devices in my house works perfectly fine and has no disconnects (ipad/macbook air/tv's/receivers)
    My thought is that iphone 6 cannot handle well the moving around between bands. 
    Any thoughts or suggestions would be greatly appreciated.
    Thanks,
    David

    Have you tried to reboot your router by turning off the power (you may have to unplug it from the power source), then waiting about 30 seconds, then turning it back on?  This seems to solve a lot of problems.

  • SQL*Plus COPY command does not work

    SQL*Plus COPY command does not work in SQL Developer. I am using SQL Developer 1.5.1 on Windows XP.
    copy from <source_db_connection> to <target_db_connection> create <target_tab_name> using select * from <source_tab_name>
    Does it work on different versions of SQL Developer ?
    Anyone had any success in trying COPY command in SQL Developer?
    Thanks in advance.

    While it hasn't been updated for v1.5, this page lists the supported SQL*Plus commands. COPY is explicitly listed as not supported.
    theFurryOne

  • Consuming PI Webservice from Webdynpro Java Not working

    Hello SAP,
    Environment: CE 7.2.
    Resolution expected immediately, Helpful answer is highly appreciated.
    Is the namespace should not exceed 60char for PI Webservice, for executing the webservice from Webdynpro Java.
    I tried with all the options in executing the PI Service from Webdynpro Java, None of the options worked. I am facing the below error while I was calling the PI Webservice.
    I don't see any problem from Webdynpro Java, what ever the procedure I have followed is the standard procedure.
    Fortunately when I execute the service from Webservice Navigator, it is working as expected. The same webservice when I consume it from Webdynpro Java it is not working
    Options tried so far:
    1) Published the Services to Service Registry and there by consuming the PI Service from Service Registry - Not worked
    2) Tweaked the URL with few options - Not worked (Tweaking the URL, ex: portType, Binding)
    3) Changing the Business Systems in PI and there after calling the service - Not worked
    4) Initializing the code, instead of creating Service Controller and calling the PI Service - Not worked.
    5) Created a Provider System and tried to call the PI Webservice from Provider System - Not Worked
    For all the Options, I am facing the same error which is provided in the screenshot.
    Below procedure which I have followed for calling the PI Webservice:
    1) Created Adaptive Webservice Model
    2) Provided PI Webservice URL (It prompts for PI System UserId and Password)
    3) Selected Option - No Service Group Configuration
    4) Provided Logical Destination
    6) Completed creation of Model
    7) Added the model as a UsedModel
    8) Right Click on Comp Contr. and selected Apply Template and Created a ServiceController for the model (Entire mapping to comp contr, Initializing the nodes is taken care by Service Contr.)
    9) Created an Template Action button and there by calling execute method which is auto rendered from CompContr..
    10) Build the project.
    11) Activated the code and Run the Application.
    12) Getting the below error which is showed in the message.
    ERROR MESSAGE:
    Exception on execution of web service on destination 'GetPIHRPeopleData' for operation 'SI_CreateHRPeopleData_OS' in interface 'SI_CreatePeopleCompany_OS'

    Hi Sankar,
    If the webservice is working fine in the Wsnavigator then there is some problem with importing the webservice in webdynpro for Java. Please check the required parameter for creating the Adaptive Webservice Model. After adding in the used model and compoent controller binding, you need to write code for to execute the webservice model.
    Please check the code for initialization and execution for the webservice and then test it.
    Best Regards,
    Arun Jaiswal

  • Flash websites not working on android 4.1.2 galaxy note.

    One of flash website not working.page shows that install flash player and flash player not installing in my system.
    Website name http://www.80percentwords.com/
    Please help.
    Thanks alot.

    If this is a legitimate request for assistance, please [https://support.mozilla.org/en-US/questions/new Ask a new question] detailing your issue specifically. Spamming/ marketing is not allowed on this forum.

  • When I unplug Apple headphones from my MacBook Pro sond from internal speakers not work, and system soud preferences displayed: Output: optical digital out port only

    When I unplug Apple headphones from my MacBook Pro sond from internal speakers not work, and system soud preferences displayed: Output: optical digital out port only

    If you see a red light in the audio output port, then the internal switch is stuck.  Insert the earphone plug a few times and see if you can trip the switch.  If that fails, insert a cocktail stirrer and the like and jiggle it around inside.  If that fails, take it to an Apple store and have the technicians at the genius bar do it for you.
    Ciao.

  • I have set hyperlinks within my ibook author document, they work perfectly until i export and view on the ipad, when only one or none work, (hyperlinks to website not working at all) what am i doing wrong?

    I have set hyperlinks within my ibook author document, they work perfectly until i export and view on the ipad, when only one or none work, (hyperlinks to website not working at all) what am i doing wrong?

    An external hyperlink should handoff to Safari and leave iBooks.
    If that's not happening, perhaps there is something misconfigured on your iPad? Have you manually confirmed those links work in Safari on your iPad?

  • Is it ok or safe to download apps on tongbu? Cause im worried that my iphone can get a virus when i dowloaded apps from othew websites (not on app store)

    Is it ok or safe to download apps on tongbu? Cause im worried that my iphone might get a virus when i dowloaded apps from othew websites (not on app store)

    booski62005 wrote:
    Is there a way to restore it with backup?
    No. You must restore it to factory settings, without restoring the backup. There's no other way to clear your phone.
    If this seems unpleasant to you, keep in mind that 1) the prolonged effects of having malware on your phone would be far worse, and 2) you brought this on yourself by engaging in software piracy.

Maybe you are looking for

  • Nokia PC Suite unable to run on Win2K SP4

    I've a fresh install of Win2K with SP4 on an old IBM 166MMX. I downloaded and installed Nokia PC Suite 6.82.22. Installation completed successfully but later when I connected my cable and phone (nokia 7610), PC Suite failed to run. Connection between

  • Problem in EP when executing a workbook

    Hi all, in the Enterprise Portal I get this error message: WSATYPE_NOT_FOUND The specified class not found RELEASE 710 COMPONENT NI (network interface) VERSION 39 RC -1 MODULE ninti.c LINE 938 DETAIL NiPGetServByName: 'sapmsBAD' not found SYSTEM CALL

  • Problem opening Tiger burnt DVD-R in Leopard

    Dear Community, I have recently upgraded from Tiger to Leopard (10.5.6) on a white MacBook and I'm having trouble with the DVD-R's I've burnt in Tiger. When I insert the DVD-R, the SuperDrive spins round for a bit then stops. No DVD icon appears on t

  • Notifications is not working for me.  Just out of the blue it stopped working Friday afternoon

    Notifications just stopped working the other day.  I cannot figure out why or how to get it started.

  • Contribute CS3 and CITRIX

    Is it supported to install Contribute CS3 on a CITRIX server? If it is supported what are the licensing implications? Basically we want to place Contribute on CITRIX so our users (who have valid licenses) can use Contribute from home when there is an