I am new for web hosting.My hosting provider use plesk panel for manage websites.I have created MS SQL database using plesk panel. but every time I am getting error when trying to connect ro database. I am using the following connection string.
i am making an application in which i have stored connection string in security.cs file under app_code folder...all is my application is going well except update panel of gridview using sql datasouce..i dont know what to write in connection string .. i mean i have connection string in class file.. so what to write in aspx page so that it will get the connection string from app_code
I have a db connection string 'ApplicationServices' defined in the connectionString section of web.config and 3 Entity Framework connection strings which have the provider connection string attribute with the same connection string as the one in 'ApplicationServices'. Is there a way to reference connectionString in 'ApplicationServices' for the provider connection string attribute of the EF connection string in the web.config, rather than providing the connection string all over again?
total noob question here. I'm toying around with Silverlight, and need to connect to a database. When I connect in server explorer (VS 2010) it works fine, because it's using my windows account to authenticate. However, when I start debugging the server side stuff is running on a different account (NT-SERVICE or something to that effect) which has no privileges on the SQL server. I've tried embedding my username/password like this:
but it doesn't seem to be working. I keep getting an error:The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
I've been using a standard web site in Visual Studio for my site, using the Plesk file manager interface to upload files either singly or in total as a .zip file.Recently I've changed the project to a VS web application.All the documentation that I see refers to using IIS to deploy a web app; if I wanted to just FTP all the source code, I may well have stayed with web site.I've not been able to find any Plesk specific deployment info.
I'm a web developer and I work primarily in Django -- I've never used ASP.Net or anything like that before, but I'm troubleshooting a problem for a friend's parents / client so I need some advice!
It's pretty simple: I need to change the parameters of their SQL Server database connection because of some server upgrades that happened at their hosting company -- is it ok for me to go in and just edit a .cs file, or does it need to be compiled or some other business?
Literally just need to change the parameters of
mySqlConn = new SqlConnection("server=hostname;database=dbname;uid=username;pwd=password;");
I am having trouble connecting to a ms sql database on the server. The hosting company said that the .sql file was imported successfully, but when I try to use the 'login' or 'create account' features im getting an error page saying:
Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. make sure the user has a local user profile on the computer. The connection will be closed.
I am sure all the connection info is correct so it is really frustrating trying to work the problem. I have listed the connection string in my web.config file to see if anyone can see anything wrong with it.
be it's a wrong place to ask the following question. Sorry for that. Our hosting provider has recently upgraded their database server from Sql Server 2005 to 2008 and I'm getting errors to connect with remote server from my development machine. Error Message "Invalid connection". Tried to find solution on net but couldn't find it.I'm using .Net 1.1. Though we've updated versions 2.0,3.5 & 4.0 but due to some certain circumstances I've no way to update it. It's a web based project. The following connection string works fine for Sql Server 2000 & 2005 but not for 2008.<add key="ConnectionString" value="Data Source=Remote Server's domain name;Initial Catalog=database name;User ID=user name;Password=surround;Persist Security Info=True;Pooling=false;Connect Timeout=45;" />Here Remote Server's domain name indicates to remote db server like: test.mysite4now.comdatabase name for example: test_surrounduser name like test_surroundpassword: surround.Can anyone inform me what's wrong with the above connection string to connect to Sql Server 2008.
in my project i am connected to sqlserver.i have created some jobs in sqlserver 2005. there are some stored procedures(sp) present in Ststem Databases->msdb->programmability->storedprocedures->System Stored Procedures.we can use these sp to create or edit the jobs through code(c#).want the connection string to access these sp's.can any one help me.
To give some background details, I have created a website for a friend that has a few pages that require a database in the background. I've used Visual Studio templates for most of it, so there's the standard ASPNETDB.MDF file that's created for users and groups, a login page and a page to view and manage those users etc etc. The login page uses the standard controls for logging in, retrieving lost passwords and so on. Being standard controls, by default they get the connection string from the web.config file. Upon attempting to upload the site to my host (1and1.co.uk in case anyone else has any dealings with them) I discovered that storing the connectionstring doesn't work. 1and1 support say that the sql databases can only be accessed using scripts like this (this is an example of theirs):
<html> <title>Queries from the MS-SQL database with ASP</title> <body bgcolor="FFFFFF"> <h2>Query from table <b>products</b> with ASP</h2> <% Set conn = Server.CreateObject("ADODB.Connection") conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=mssqxxx.1and1.com;UID=dboxxxxxxxxx;PWD=xxxxxxxx;DATABASE=dbxxxxxxxxx" 'This code block will create a recordset Set rs = Server.CreateObject("ADODB.Recordset") SQL = "select * from products" rs.open SQL, conn 'will iterate to display the records got from the database While Not rs.EOF response.write(rs("id") & " " & rs("price")) rs.MoveNext Wend 'closes the connection rs.close conn.close Set rs = Nothing Set conn = Nothing %> </body> </html>
So my question, is it possible to get the standard asp.net controls to access a database through a script like this?
We're migrating one of our sites to ASP.Net. We do not want to use integrated security, which uses the windows account to connect to sql server (not going to get into why, its just out of the question). We created a username and password to connect to SQL Server, and would like to use that username and password, however, we also do not want other developers to see this information (easily read from the web.config).... I know it can be encrypted, but it can just as easily be decrypted by the developers - plus encryption has a performance hit.
Is it possible to connect to a SQL Server Express 2008 database in ASP.NET with a server name of (local) like "server=(local);integrated security=SSPI;database=DBNAME"? I'm working with another developer on a project and it's getting annoying having to have 2 different version of web.config because he is using SQL Server 2008 and (local) works, but I can't seem to get it to work with SQL Server 2008 Express locally. The database is located on the same computer as the .NET code in case that matters.
I have a new server that I am attempting to deply my very first asp.net website on. I have installed SQL 2008 r2 and loaded my DB on it. I am able to access the server/DB through Visual Stuidio. At least I know i can call it from the webserver to my local PC.
For some reason I just cant get my we.config's connection strong right. It might even be the <provider> info that I have wrong. I am just too inexperienced to know for sure. My Web.Config is very short so I will post all of it here.
-- Code is posted at the end --
How do I modify my local project to use my webservers DB instead of the standard SQL Express DB? The only connection string
Machine.Config that points to the sqlexpress database. Again I lack the experience to know how to do this. I am using Visual Studio 2010 and SQL Server 2008 r2 on my local pc.
In my program, I want to make database connectivity, but when i write a connection string, complier says that it is unrecognized escape sequence(which is bolded in the following string), the string is :
Data Source=HIMANSHUSQLEXPRESS;Initial Catalog=Himanshu;Integrated Security=True
My Web Application is hosted on Server A. My Database is hosted on Server B.
Server A and Server B are not on same network. How can i point my connection string to the database in this scenario? Can any one give an example for this kind of Connection String?
I am retrieving connection string based on value stored in cookie.NowI am making crystal report. I cannot hard code server credential. I have to get these credential from connection string from web.config. so that i can pass these credentials to my crystal report .
ConnectionInfo reportConnectionInfo = new ConnectionInfo(); reportConnectionInfo.ServerName = connection string server name from web.config reportConnectionInfo.DatabaseName = connection string database name from web.config reportConnectionInfo.UserID = ...; reportConnectionInfo.Password = ...;
Alright, we have two database servers, one is owned by us, one owned by a partner. Our partners have been having issues lately that have been causing us numerous sql timeout errors, which takes down our whole system. We'd prefer to limit the time those queries can take to say 20 seconds max, otherwise quit trying and throw the error (which we can catch with a try/catch block). Couple of questions: Is there a way to set a particular db/connection string to timeout after X seconds? Is this the best way to quarantine that other system? or are there better ways to go about this?
i have problem in connection strin i host my site and database is in DATA DIRECTORY my site run successfully in offline but an error of connection string in online pls give me an example of string for online i use asp.net, C# and sqlserver 2005
When I try to encrypt the "connectionStrings" section in the web.config file of my asp.net web application on Windows Server 2008, I'm getting the following error:
Administration utility (2.0.50727) to install and uninstall ASP.NET on the local machine. Copyright (c) Microsoft Corporation. All rights reserved. Note: This utility has limited capabilities on the Windows Vista operating system. It is recommended that you use the "Turn on or off Windows features" option of the "Programs" component of Control Panel to install or remove ASP.NET. It is also recommended that you use the IIS Manager component or the Appcmd.exe tool to configure ASP.NET applications.
The above information is followed by the list of valid options to aspnet_regiis.exe.
I have a named instance of sql 2008 developer edition installed. I have changed the Server name but the query string will still not work. I want to be able to use the default db "aspnetdb.mdf". I use Windows authentication to connect. How can i change the connection string to get this to work?
just for my testing purpose i know i can define both the connection's outside in a single web config file by different name's and access them in my front end according to it but what if i want to have seprate for both connection's web.config situation is like this see image so i want to access my connections from second web config file how i can do that.