(The database is on my PC)
My database worked just fine for a month, and then this error came. It is not related to a specific file, nor a specific project (Even if I'll create a new website and try to add a new database file, this error will pop)
I guess it happens because the sql server is not running on my PC, and it is true that I don't see any sql related process running.
How the I fix it?
P.S. I know this error has a lot of threads on the internet and even here in SO. But most of them solve the problem for a complicated, secured connection with a remote server. All I want is to create a new empty ASP.NET website and add a new .mdf file for it on my PC.
It may be related with the SQL Service authentication which you have to verify from the control panel->Administrative tools->Services. Locate SQL Server(Express) Try changing the Log on As Network Service instead of local system.
that is a error Locating Server or Instance.
Try connecting by IP.
Have you disabled SQL Server browser?
I was facing something similar so I will share how I solved it, it might work for you or not, but here are my 2 cents.
My environment: Windows 10 ( upgraded from windows 8 in which SQL Server was working fine)
SQL Server 2014 Express
Solution: I Opened the services program, and found the SQL Server services, I saw that all of of them were up except by one which was disabled, the "SQL Server Agent", I enabled it and was able to connect to my DB instance.
Hope it helps
Regards
Related
I've created a website in Visual Studio 2012, now when I upload my files to the web server I receive an error whereby the system cannot find the file specified.
It seems to only happen on files which fetch data from a database.
I've tested my connection string and that seems to be working as I've close the connection as well as deleted the local db I was using. My site works fine when run locally, but the second I try access it online I get the same error.
Link to error image:- http://imgur.com/wkXV8fe
I've highlighted the error that puzzles me in the image. It keeps trying to find the file on my local pc it seems. I've searched through my code and can't seem to find anything that is hard coded.
Your help is much appreciated, hopefully someone has encountered and solved this problem.
The possible reason are,
The folder which containing specified file is may be read only or admin access or hidden in server machine. If possible, check the folder properties.
Make sure the file containing folder has uploaded or not on server.
It won't find your local pc if you hosted on other IP(server). The same root folder may be present on server side, so don't get confuse with server and local machine.
The "file not found" error is actually misleading, the error you need to deal with is the SqlException error and indicates the connection string is wrong - you need to update the connection string to access the SQL Server externally.
Are you also deploying the database to another server or are you attempting to access the same database as when testing locally? If you are accessing the same database locally, make sure the web server you are using to host the website can actually access the SQL Server on your local machine - check all firewalls and other things, and make sure that the SQL Server accepts TCP connections.
I opened my web project today and for some reason I could not gain access to my database files. I get the following exception whenever I try to add, edit or refresh my database:
A network related instance specific error occurred while establishing
a connection to SQL Server. The Server was not found or is was not
accessible. Verify that the instance name is correct and that SQL
Server is configured to allow remote connections.
I took a look at my connection string for any spelling errors and deleted my database and replaced it in the folder I had it in. I can't seem to find a fix for this so any help would be a appreciated. I am using Visual studio 2008 for this web project.
This sounds like the same problem that I had myself awhile back. My problem was that my SQL service pack 1 did not install properly so I had to install Microsoft SQL Server System CLR Types, Microsoft SQL Server 2008 Management Objects and Microsoft SQL Server 2008 Native Client. After that I could create new SQLdatasources but I could not edit the ones I had previously before my problem. I had to restart my computer in safe mode and delete my SQLEXPRESS folder then recreate the database connection in visual studios. When I finished that everything worked fine.
This is the site I got those downloads, http://blogs.cametoofar.com/post/cannot-load-file-or-assembly-microsoftsqlservermanagementsdksfc.aspx
I'm deploying a small ASP.NET (framework 3.5) application in a Windows Server Web 2008 32 bits, IIS 7. The applications needs connection to an Oracle DB in another Server, using the tradicional DataAdapter, Oracle Connection, etc.
I´ve installed correctly the Oracle Client in the server (the server is another server´s client) and I´ve checked that this server has access to the server where the database is.
Even though my app isn´t able to connect to DataBase. The message says that Oracle components haven´t been found. It doesn´t find the OleDB Provider for Oracle or some dll.
¿Something I shluod know about permissions of the ASP.NEt users or something like this?
Some idea??
Thanks in advance.
Gus.
Check the path. It could be that the Oracle client directory is not on the path of the account that runs your ASPNET app.
Actually there are other steps you can go through, to verify the Oracle client install.
This article is old but may be helpful.
Despite that I’m a regular reader of this great forum, this is my first post on it. I believe that this community can help me with the following problem that I have.
I’m trying to publish an ASP.NET website over an IIS 6.0 (Windows 2003 Server), and I have some troubles trying to connect to the database. Curiously, I have installed another ASP.NET website into the same IIS 6.0 with the same properties and security parameters and can connect without problems with the same database. The application that works fine is almost the same that the one that can’t connect with SQL Server (actually is the same but with several modifications).
I’ll enumarate some information related to the problem:
S.O: Windows 2003 Server
SQL Server Engine: SQL Server 2008 SQL Server accept remote connections? Yes.
ASP.NET version: 2.0.50727
The connections via TCP/IP are enabled to the SQL Server instance? Yes.
The corresponding user that I have in the connection string, actually exists into the database with the “owner” role? Yes.
ORM Tool used: nHibernate
I get the following error when I try to run the aplication into the browser:
Error while establishing a connection
to the server. When connecting to SQL
Server 2005, this failure may occur
because the default settings SQL
Server does not allow remote
connections. (provider: Shared Memory
Provider, error: 40 - Could not open a
connection to SQL Server)
In order to isolate the problem, I made some test. For example, using the web app that works fine I can connect without any problema with the database that uses the web app that can’t. With this evidence I concluded that the problem is within the web app and not into the SQL Server instance. I also google it my problem but sadly I can't find nothing usefull to solve it.
If someone can help me I’ll appreciate that.
Thank you so much for your time!
The most likely explanation is that your connection strings are not the same between the two applications. The error in question is talking about the Shared Memory provider, which is not the same as TCP/IP connections.
I've found the problem. In order to solve it, I was install in a virtual machine the same OS (Windows 2003 Server) and IIS (6.0). In this clean enviroment, I've found that the changes that I made in the home page was the problem. This aspx page has Web Parts that I'll investigate to know why is causing troubles with the database connection. I navigate to another page of the web application and it can connect with the database and retrieve information without any problem..but when I try to reach the home page the aplication colapse because of the problem that I tell you in this thread.
I'll post more news about this problem when I resolve it completely
Thanks for your assistance and time.
I'm having a problem getting a simple ASP.NET webpage to display. The page contains a GridView with a SqlDataSource connected to an Oracle database.
When I run the page in the VS debugger (cassini webserver) everything works fine, but when I publish the application to my local IIS server (same machine), I get the following error:
ORA-12154: TNS:could not resolve the connect identifier specified
If it was a different machine I could understand that it might be a tnsnames.ora or other problem that I could investigate via tnsping. I have also set the security on the folder containing the Oracle drivers to "Everybody", and set the webapp to run under a "Priviliged" AppPool (Identity as Administrator), but with no success.
Anyone else got any ideas??
this guide is a bible for this kinds of problems :)
Actually i have printed one copy of this guide and distribute it to every consultant involved with IIS ASP.NET to ORACLE connectivity issues. The checklist will probably get your problem solved, unless you have a problem within your code which you don't seem to have based on your scenario.
I think you more than 1 Oracle client. You need to search ALL your tnsnames.ora files with the windows explorer and compare and synchronize ALL those files.
maybe you need to specify the IP