My Published Application Can't Access The Database
Jun 8, 2007
Hi
I am nearing the end of creating my Windows App for work. So I tried to publish it, that was fine until I ran the app, from the same PC as I use to develop, with the same login etc. However when I use the published app I can't connect, to the database, return to VS2005 and run my app from within there and no problems. It is SQLEXPRESS (SQL Server 2005), but I have checked the settings there are correct (I assume VS wouldn't connect otherwise).
Help please.
Details...
Server = FRED database =Joe
Connection string (Data Source=FREDSQLEXPRESS;Initial Catalog=JOE;Integrated Security=True
Server (Win2003) and my PC (Win2K) are on the same domain
Using TCP/IP
I can't see how to enable JiT debugging despite the 'help' at the end of this error details...
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at TrainTrack.frmAddCompetency.frmAddCompetency_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
TrainTrack
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/graham.yetton/Local%20Settings/Apps/2.0/4GZWZKGB.4O3/9XXGWKLB.MTQ/trai..tion_75116344273b6719_0001.0000_b44ce39f580948f8/TrainTrack.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
View 4 Replies
ADVERTISEMENT
Jun 27, 2006
Hello everybody,
Here is the case:
1 €“ When I make a web application with VS 2005 (on a Windows XP Pro SP 2 machine) using a database (with the included SQL 2005 Express) all works fine on my dev computer
2 €“ After publishing that application on my Web server (an old but fresh reformatted machine with Windows 2000 Server SP 4 - but without any special feature of server version such as active directory configured -, IIS 5, SQL 2005 Express SP 1 with Advance Services, both 1.1 and 2.0 frameworks installed on it). I have this error when I call the application from IE:
(Be kind as all my configuration and error messages are in French so I try to translate them the best I can but if translation is not clear tell me €“ and if someone knows how I can have those messages in English tell me also ;-)
Open session failure for user [my web server name]ASPNET
For information I have done/try all the following (and probably more; don€™t remember as I am stuck on this since nearly 2 weeks now ) without success:
- changing the SQL Server surface area exposition to remote connections for TCP/IP, named pipes and both (in fact even when the exposition is set to local I still have the same error€¦)
- adding a [my web server name]ASPNET account with dbo/sysadmin rights with SQL Server Management Studio Express, as well as other special accounts (IUSR and IWAM)
- manually attaching database under SQL Server Management Studio Express and mapping the above accounts to it (and of course modifying the ConnectionString settings in the web.config file accordingly)
- same thing with those 3 accounts but this time for folder and subfolders with full control rights
- publishing my web application with both Publish Site and Copy Site options from VS 2005 (which seem to do exactly the same thing). I am using the Remote site connection option (the one where you need to enter the IP address of the web site and have FrontPage extensions installed on it)
- and all other stuff as mentioned in an earlier post on this matter (http://forums.microsoft.com/msdn/ShowPost.aspx?postid=505487&isthread=false&siteid=1&authhash=7399dc0a380f8452fd1aa40f4b530be62a7a8e70&ticks=632868985326044888)
I can give any complementary information such as error stack trace or web.config file if needed to help me.
For information, I have an older web application running (perfectly) on this server. This one was done with VS 2002/framework 1.0/SQL Server 7.0 database and is now running with framework 1.1/SQL Server 2005 Express on the server. I thought at first that application would be the one to give me headaches as the database was from an older version of SQL Server but I simply attached the .mdf file under SQL Server Management Studio Express and all worked perfectly and immediately€¦
I am not too bad in development but I must confess I am quite a noob as Windows/IIS/SQL server/network administrator so I really need a help on this as I am stuck since nearly 2 weeks and I think I won€™t have many hair left on my head if I don€™t find quickly a solution to that problem.
Thanks in advance.
DreamingBear (in fact NightmareBear would actually sounds better )
View 9 Replies
View Related
Jun 26, 2006
Hi all,
I am stuck with a problem using ASP.Net website. I created a website which accesses a database table in SQL Server 2005. The default.aspx is a form which inserts/updates/deletes data from the database. After creating the website I published it to IIS (Inetpub -> wwwroot). When I use Visual Studio 2005 and build the website and start with debugging. the form comes up and i can insert/update or delete the data from the table as I want. Now, as I have the website published I can access the form from another sharepoint website using the url as
/Employee_Data/Default.aspx">http://<mydesktop>/Employee_Data/Default.aspx
the form shows up but I am not able to access any of the database. I do not see any errors either. Once I click on the button the page just refreshes but nothing else happens. I have my web.config as :-
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<compilation debug="true"/>
<authentication mode="Windows"/>
</system.web>
</configuration>
Am I missing something? I even have Anonymous access in the IIS inetpub properties. I can even the database as I am the administrator..... I appreciate your suggestions.
Thanks,
Kavya
View 1 Replies
View Related
Jul 17, 2007
Can someone please tell me how to retrieve/query the list of fields from an entity of a report data model that has been published on the reporting server programmatically ?
I am trying to upload a report data model to the reporting server and planning to use that model as the data source and consume it through our existing web application?
Thank you ,
Rashid A. Khan
View 1 Replies
View Related
Oct 18, 2006
Hi all...
I am writing a Windows Application which will be used by about 100 clients. (NT Authenticated)
The application is going to be used in a LAN enviroment. User who have access will download a VB.NET application from a web site.
Of course, I want to prevent any of the 100 users from using a tool such as Query Analysis or ODBC to connect directly to the database and modify data.
So, it appears the way to go is to the "Application Roles". For this to work, the application roll password has to be saved in the application to execute the sp_setapprole procedure.
Is there a way to secure this password? I am worried about a user somehow extracting the password from the application and connecting directly.
Am I on the right track here? Any ideas appreciated!
Thanks,
Forch
View 4 Replies
View Related
Nov 1, 2006
The sample application provided with Access Database Synchronizer fires a "A request to send data to the computer running IIS has failed. For more information, see HRESULT." exception on my WinCE 4.2 device.
I debugged it with VS2005 to see what was going on and found that the problem resides in the line:
m_connDesktop.Pull("MSysObjects","SELECT Name FROM MSysObjects WHERE Type=1 and flags=0",accessSysConnectString,RDATrackOption.TrackingOff,"Err_MSysObjects");
It seems that connection m_connDesktop is ok but calling Pull method fails.
I've verified that SSEvAccessSync service is started when ActiveSync detects device connection and that firewall rules are correctly updated.
Also, i verified my System.mdw and i discovered that there is no "MSysObjects" table (only MSysGroupList, MSysGroupMembers, MSysUserList and MSysUserMemberships queries are there).
Do you think the problem is there?
How can i solve it without damaging System.mdw?
I cannot figure out what's the purpose of this line of code, can you help me?
View 8 Replies
View Related
Dec 13, 2007
SQL Database in my application with windows authentication rejects accessing after deploying and remote access
1- My web applications databese access is windows authentication
2- In developing area there is no problem for accessing database
3- After deploying to another server there is problem accessing database:
Cannot open user default database. Login failed.Login failed for user 'BRCK231ASPNET'.
How can I solve this problem?
Thanks.
View 1 Replies
View Related
May 14, 2007
hi,
i am tring to use the 'xcopy' way to deploy my web site, this is the connection string i am using:
"Data Source=.SQLEXPRESS;INITIAL CATALOG=;AttachDbFilename='|DataDirectory|HotStage.mdf';Integrated Security=True;User Instance=True"
it works when in debug mode, but after i depoly it to my XP's IIS, it can not login the database, the error message is :
Cannot Login to the default user database. Login Failed. Login Failed for user xxxASPNET
'xxx' is my computer.
i think this problem is cause of improper setting of security, but i really do not know how to set it in this situation, because the database is attached to the db system dynamically.
plz someone help, thx
View 3 Replies
View Related
Mar 26, 2007
I have been working with Visual Studio 2005 and the Personal Web Site Starter Kit. All is well and working. My problem is that after the database is updated (as in uploading photos and album creation) and the original web site is edited and republished, the web site database is overwritten and all the work is lost. What is the proceedure to either copy the web database to the development site on my computer so updates will not be lost, or a method of publishing that will not loose the up to date content on the web server? I would much prefer to be able to copy the database to my development computer as adding tables to the database is something that needs to be done. Any help on this would be appreciated.
Thanks
View 3 Replies
View Related
Nov 9, 2007
I create a WebSite onto the internet.
Then I created a database with MSSQLmanager provided by the WebHosting.
I created a Table and put some data in it.
When I try to access the DataBase an Error says: "Connection cannot be opened. On default settings you cannot access a Database Remotely."
What shall I do to configure my Database.
basically I don't know where to go to change configuration of my Database.
In my intranet I would use SQLServerSuraceArea.
But on Internet I do not know.
someone Help.
Did I miss something ?
View 4 Replies
View Related
Jun 23, 2014
i am currently working on designing a database for a bank as a school project for my database class. We have to draw up an entity relationship diagram, Sql tables, database size estimate etc. I am currently working on the security portion of the project. I need to list the groups that have access to my application and use a grid format to show access to specific tables.
I am currently working on designing a database for a bank as a school project for my database class. We have to draw up an entity relationship diagram, Sql tables, database size estimate etc. I am currently working on the security portion of the project. I need to list the groups that have access to my application and use a grid format to show access to specific tables.
Role Loans Payments Transactions Accounts Customer Emplo
Database Admin SUID SUID SUID SUID SUID SUID
Branch Manager SUI SUI SUI SUI SUI SUI
Internal Auditor S S S S S S
Loan Officer SUID SUI SUI S S
Tellers S S S S SU
Customers U
View 1 Replies
View Related
Nov 28, 2006
Hi,
I am developing an application that uses Access database (mdb file) to store the user data. The user of this application is not interested in the database file (to view in MS Access Environment). Does the user machine requires MS Access installation to run my application or just some couple of dlls (OleDB driver, Access DB Engine,..) should be enough to run my application?
Thanks,
Rao
View 3 Replies
View Related
Dec 6, 2000
Hi,
Can anyone tell me how i can access an application or open tables in MS sql server that are in MS Access. Its urgent and any help will be appriaciated.
View 2 Replies
View Related
Jun 28, 2005
I am experiencing problems with databases for the web application that i am developing. The problem is that I have transferred the database from access to sql which initially seemed to work ok. I am now however struggling to solve the problems with one of my fields titled 'notes'. The trouble is that in the original database the notes field contained different notes from different dates for each record, and each note is separated by carriage returns. It is the carriage returns that are now proving to be a problem in the sql database but i am not sure what to do. Any advice would be appreciated.ThanksDan
View 3 Replies
View Related
Apr 27, 2006
Hello all, We have a SQL database that uses a MS Access projectfront-end, which I am now creating an ASP.Net application for (And am completely new to so may be missing some foundation concepts). With the Access project I added Active Directory groups to the database to use for permissions, logins, etc. For the ASP app I have it set to use Forms authentication with Active Directory (ActiveDirectoryMembershipProvider). I can login to the app with the AD usernames/passwords but the connection from ASP.Net to SQL is using the ASP User. Is there a way to provide the authentication from the ActiveDirectoryMembership through to the SQL server, so the user: bobuser would be authenticated to SQL instead of ASPNETUSER?Or do I need to have the ASP.net app handle the permissions of which SP's a user can execute?Any help or suggestions are appreciated.Thanks,Jamie.
View 2 Replies
View Related
Feb 7, 2005
Hi,
I have recently transfered data from MS Access to MS SQL Server 2000 and created user interface in MS Access Project (ADP). Now I need to secure the data on server and want to access it ONLY through interface I created in MS Access. Every user has to log in the application (user id and password). Users may have the same access rights to the server (so maybe just one account or whatever I need for all of them). Can anyone advice me how to set it up? To access sql server from MS Access I am using ADO.
Thank you.
dj
View 2 Replies
View Related
May 24, 2006
Hi all,
sql server 2000
windows 2000
authentication is through the db (not windows).
I am attempting to limit access to one of our production sql server databases. I want to ensure that only application users can connect to the db, i.e they connect to the application and the application connects to the database (database access is transparent to them). The app uses a common login account.
I would like to prevent users from connecting to the db using ad hoc query tools or other EDIs (toad for sql server, ...). Currently there is nothing stopping them from doing so using the application acct/pwd.
I am contemplating writing a trigger that checks for the program that the user is using and if the program is not recognized, kill the session. Is this the right approach or is/are there any "out of the box" utilities that will do this for me?
FYI. the acct/pwd that the app uses to access the db is well known to users.
View 6 Replies
View Related
Nov 2, 2006
I can't run my web application on remote pc which is connected in flan with my pc.It works on my local pc but it is not working on remote pc. i m geeting an error like as blowAn error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) i have used sql server 2000 for my database but i my getting error for sql server 2005 which i have never used in my web application.Here is the Exception detailsException Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)i have used coonection string as followsData Source=neptune;Initial Catalog=azim;User ID=saso can anyone give me soluion of this problem
View 1 Replies
View Related
Mar 13, 2008
I have the below procedure with an output parameter '@rowcount'. Now My issue is how to access the value of '@rowcount' in my ASP.Net application using C#. I have also pasted my C# code which I am using .
create procedure mypro1(@id varchar(10),@rowcount int output)
as
select * from canid where id like @id
/* @@ROWCOUNT returns the number of rows that are affected by the last statement. */
select @rowcount=@@rowcount
--------------------------------------------------
C# code to retrieve the output parameter valuecmd = new SqlCommand("mypro1", cn);
cmd.CommandType = CommandType.StoredProcedure;cmd.Parameters.AddWithValue("@id", TextBox1.Text).Direction=ParameterDirection.Input;
Parameter cout = new Parameter("@rowcount",SqlDbType.Int);cout.Direction = ParameterDirection.Output;
cmd.Parameters.Add(cout);
can some body assist me in the above code whether its right or what needs to be added to get the output parameter value.
View 3 Replies
View Related
Nov 10, 2005
Hi,
Is there anyway I can impliment this in my application without installing it as a COM. My Web Hoster says they won't install it. The Data Access Application Block
View 3 Replies
View Related
Jul 12, 2000
Hi all
Certain people in our company want to use Crystal Reports for data-processing. Problem is we want them to NOT be able to access data in databases within the live server.
Given that we use trusted connection to validate all kind of data-access, I am wondering if there is a way so that (via NT administration or via some SQL Server security features)
the live-server can refuse any connection request from the Crystal Reports application. At the moment the same group of people are allowed access to database (and should remain to be so) on this "live" server via some other applications (e.g. Microsoft Access).
Any advice is welcomed.
Simon
View 1 Replies
View Related
Jul 20, 2005
Hi there,I have written an application which uses MS Access for it's database engine.Due to the large size which the database has become I have decided that itwould be sensible to use SQL Server with the application instead.I am an extreme SQL Server newbie so I am not really sure what I'm doingyet! I have successfully downloaded and installed the MS SQLDE 2000 andservice pack 3.What do I need to do next? Ideally I would like to convert the existingAccess database to MS SQL Server format. Also I would like to know if it ispossible to create an SQL Server database from scratch using a guienvironment similar to Access and if so which software (preferably free) doI need to achieve this?Many thanks,Clive.
View 3 Replies
View Related
May 19, 2006
I have installed the SQL Server 2000 and its up running.
I can connect to the database direct as administrator, but my test application(asp.net 2.0) returns an exception.
SqlConnection sqlConn = new SqlConnection("data source=10.61.90.24;initial catalog=testdb;persist security info=False;user id=sa;pwd=data;Type System Version=SQL Server 2000;");
sqlConn.Open();
I receive this exception:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
View 4 Replies
View Related
May 1, 2008
Does anybody knows, from where can I download the latest version of DAAB for SQL CE 3.5?
I know that the Moblie Client Softvare Factory was included a DAAB, but it is outdated in some respect.
So any information will be greatly appreciated.
Gabor
View 3 Replies
View Related
Sep 11, 2007
My application is written in C/C++ on Linux platform. I am wondering if there is a C/C++ driver for Linux to access SQL server.
thanks.
View 3 Replies
View Related
Jan 19, 2007
Hi all,
trying to use MS Access Automation from within SQL Server 2000 .
Seems that OpenCurrentDatabase (Access Application property) just hangs...
Following, the code that is used:
--BOF--
--object vars
DECLARE @w_object INT,
@s_object INT
--error handling vars
DECLARE @error INT
DECLARE @src VARCHAR(255),
@desc VARCHAR(255)
--execution vars
DECLARE @command NVARCHAR(100),
@property NVARCHAR(20)
--create an Access application
EXEC @error = sp_OACreate 'Access.Application', @w_object OUT
IF @error <> 0
BEGIN
EXEC sp_OAGetErrorInfo @w_object, @src OUT, @desc OUT
SELECT CONVERT(VARBINARY(4),@error) AS Error, @src AS Source, @desc AS [Description]
RETURN
END
--get default security level
EXEC sp_OAGetProperty @w_object, 'AutomationSecurity', @property OUT
SELECT @property AS default_security_level
--set application security level to low (no sandbox)
--thought this would help, but no luck
EXEC @error = sp_OASetProperty @w_object, 'AutomationSecurity', '1' --Low Security
IF @error <> 0
BEGIN
EXEC sp_OAGetErrorInfo @w_object
GOTO Cleanup
END
--Test security level
EXEC sp_OAGetProperty @w_object, 'AutomationSecurity', @property OUT
SELECT @property AS my_security_level
--check current user
EXEC sp_OAGetProperty @w_object, 'CurrentUser', @property OUT --should be Admin
SELECT @property AS current_application_user --it is Admin
--Open non password protected database,
SET @command = 'OpenCurrentDatabase("C:mikros.mdb")'
--unfortunately this hangs...
EXEC @error = sp_OAMethod @w_object, @command
IF @error <> 0
BEGIN
EXEC sp_OAGetErrorInfo @w_object, @src OUT, @desc OUT
SELECT 'Failed to Open database', CONVERT(VARBINARY(4),@error) AS Error, @src AS Source, @desc AS [Description]
GOTO Cleanup
END
--Close current database
EXEC @error = sp_OAMethod @w_object, 'CloseCurrentDatabase'
IF @error <> 0
BEGIN
EXEC sp_OAGetErrorInfo @w_object, @src OUT, @desc OUT
SELECT 'Failed to Close database', CONVERT(VARBINARY(4),@error) AS Error, @src AS Source, @desc AS [Description]
END
Cleanup:
--close Application
EXEC @error = sp_OAMethod @w_object, 'Quit'
IF @error <> 0
BEGIN
EXEC sp_OAGetErrorInfo @w_object
END
--destroy Application Object
EXEC @error = sp_OADestroy @w_object
IF @error <> 0
BEGIN
EXEC sp_OAGetErrorInfo @w_object
END
--EOF--
Any help would be appreciated.
Thanks in advance
View 1 Replies
View Related
Feb 16, 2005
I have a ASP.NET time sheet management application I designed - today I put it live on the webserver and recreated the database on my SQL 2000 server. When I attempt to view, all of the pages where I query the database I catch the error "SQL Server does not exist or access denied".
The concerning part of this is that I have tested the live database from my development PC (remote - offsite) and it works fine. This shows that the database that I brought over is intact and the user has the appropriate permissions. The only thing that I changed in the application when I copied it to the server was the connection string server name to reflect the location change.
The setup is as follows:
Development PC on a broadband connection running Windows 2003 server enterprise, SQL Server 2000 SP3a, Visual Studio 2003 Enterprise.
Web/Database/Email server running Windows 2003 Standard, SQL Server 2000 SP3a, Exchange 2003, Active Directory, DNS etc.
When I run the application on the Web server from a browser with local names ie. http:\SERVER1application I get the "SQL Server does not exist or access denied" errors. When I try to connect to the application on the web server from my development PC i get the same problem.
When I changed the connection string on my development PC to the webserver/dbserver it runs fine.
I don't understand how a local proccess is having difficulty authenticating to the database when I can access it remotely just fine.
Anyone have any suggestions?
View 2 Replies
View Related
Jan 9, 2007
My database knowledge are with MySql and Oracle, but recently I was asked to evaluate the migration of an existing (and maybe more) from ms access to sql server. My question is simple, if all of the sql are hard coded into the code ... how well this sql will work, I mean is the sql between access and sql server are plug'n'play ? However in any case, I always rewiew all of the sql.
View 2 Replies
View Related
Jul 23, 2005
First off, sorry if my cross posting offends anyone. I'm posting thisin Access and SQL Server groups - not sure which one is appropriate.I have a relatively simple ASP.NET/VB.NET application that is nowhitting an Access 2000 database over an intranet. We have to migratethe database to SQL Server 7. My experience with ASP.NET is prettylimited and my experience with SQL Server is nonexistent.We have an MSDN subscription, so I went to the downloads section to getSQL Server 7. Guess what? SQL Server 6.5 is available, as is 2000 and2005, but no SQL Server 7. So my first question is, does anyone know ifit is available for MSDN subscribers?The next question is, does anyone know of a good resource that explainshow to make the transition from Access 2000 to SQL Server 7? I know thedata has to be migrated and the connection between the application andthe database modified, but am really not sure exactly what to first andthe correct way to go about it. The application is a simple productconfigurator. There's not a lot of data and it's not a very complexdatabase.Thanks in advance. If you'd like, please copy responses tolcifers(AT)yahoo.com (AT) = @TIA.Cheers.- Luther
View 2 Replies
View Related
May 8, 2007
Hi guys
I'm writing a C# application which connects to a local SQL database for data access. The application connects to SQL Server through windows authentication, but opens up the port and sqlbrowser to others on the network wanting to access the database through SQL Server authentication, and also allows remote users to connect to this server remotely if they have the login and password (and because the port is already open)
I understand this is not secure and open to attack, and am unsure of how to secure these processes without blocking these three types of access, from A.) the local user, B.) the network user and C.) the remote user across the net.
Have researched this a fair bit, but get somewhat lost amongst all the jargon.
View 6 Replies
View Related
Feb 28, 2007
hi,
how can i publish my RS2005 reports with asp.net(2005) application.I am trying by creating virtual directory ,the aspx page runs but it is unable to access reports from report server
Is there any article on how can i deploy report with asp.net so that i can access report using aspx page remotely
pls suggest me
View 1 Replies
View Related
Jun 6, 2007
All:
I am writing an Internet/Extranet based (ASP.Net 2.0) web application that uses SQL server 2005 as the database. I am using forms authentication on my web application. I am also storing the connection string to SQL server in my web config file. The conn string is encrypted using DPAPI with entropy. I currently have created a SQL login account on my SQL server for use by the web application. This is the user ID I am using in my conn string. The reason for this is because all persons using the application will NOT have a windows login.
Here is my question: The login I created currently has defaulted to the "dbo" role and therefore has "dbo" rights to the database. I want to setup up this login account so that all it can do is execute stored procedures. I dont want this SQL login to be able to do anything else. In my application I am using stored procedures for ALL data access functions, via a data access layer in my application. Can someone guide me step by step as to how to setup this type of access for this SQL login.
Thanks,
Blue.
View 1 Replies
View Related