473,607 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Connecting to Database from Windows Control running in ASP.Net webform

HI all

I am having a windows Control running on ASP.Net webform. From this windows control I am trying to connect to database to do some database operations.

Now I am facing problem while connecting to Database from client systems which is having only .net framework without SQL Client Installed. It works fine on client systems having .Net Installed with SQL Client

What could be the problem. How Can I resolve this problem?

I am sure you will be asking yourself why I am going for Windows control!!!. I could not do it without using windows user control since I am using Webbrowser Control

Thanks in advance. Appreciate early response

Thanks
EJ
Nov 18 '05 #1
10 1701
Hi EJ,

From your description, you put some data manipulation code( for SQLServer)
in a winform control which is used in webform page. And you find it works
on some client machine with both .net framwork and sqlclient , but not work
on some others which only have .net framework but without sqlclient
installed?

I'm not sure what the "SqlClient" do you mean? Is it the components under
the System.Data.Sql Client namespace? If so, as far as I know, they're
installed together with the .net framework and is not separately
distributed. Or if the SqlClient is other things ,would you please provide
some detailed info on it? Also, it there error message when the winform
control not work. The following kb has mentioned using IEHOST log to debug
embeded IE host objects

#HOW TO: Use the IEHost Log to Debug .NET Object Hosting in Internet
Explorer
http://support.microsoft.com/?id=313892

If you have any questions or new findings, please feel free to post here.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #2
HI Steven

Oh, You are back! thank

In my previous post, i was refering to SQL server client tool

Now I have found that, you about the application I am developing. As you know you have solved many of our problem using where we faced in usiing webbrowser control in ASP.Net webform. In the same webbrowser control after clicking on document elements, I am trying to save the data I am reading from Iframe to database where our webapplication is running.

I tested this application, it runs fine in intranet zone and connents to SQL server on the web server and saves the data, if .Net Framework with MDAC 2.7 is installed on the system wherever the application is run.

Now when we are trying to access the same webapplication on internet we are facing problem in connecting to Database on the webserver. It is unable to connect to the database from webbrowser control which is running on client machine. How can we reslove this problem

One more thing I observed is I am able to connect to the database which is on the webserver only if the server name is given as the machine name where SQL server Database resides in the connection string. We are unable to connect to the database if the IP address of the SQL server Database is given in the connection String

Hope you can understand my problem. Help me in resolving this critical problem. Eary response is appreciated

Thanks
E
Nov 18 '05 #3
Hi EJ,

From your further description, the problem seems also likely cause by the
connection to the DataBase server from client in internet based scenario.
And sometimes when the Server is behind a firewall, the client may fail to
connect the server. Here is a kb article discussing the problem.

#INF: TCP Ports Needed for Communication to SQL Server Through a Firewall
http://support.microsoft.com/?id=287932

Also, the MDAC is auto intalled on the XP or 2k machine, so generally ,this
won't be the problem.
But I think you can still perform some further tests to see whether the
problem is caused by the problem on connecting to the ServerMachine or is
due to the MDAC component installed on client.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4
HI Steven

I am facing one more problem with respect to Windows Control contaning Webbrowser control which is running on client system in webapplication. The element click is not working on Win 98 system. What could be the reason? How can I resolve this problem?

Any other updates/patches are required on win 98 system to run this windows control contaning webbrowser control properly

Please reply as soon as possible

Thanks
EJ
Nov 18 '05 #5
Hi EJ,

Thanks for your followup and the further information you provided. Yes,
maybe this is the cause. But can you confirm what the cause of the issue
is? What about the firewall for connect remote sqlserver in internet
scenario I mentioned in the last reply? As for the WIN98 machine, what is
the IE version on it, I suspect whether the problem that the element click
not work is caused by the IE's version too low. Also, I think you can
first use a winform applicaiton rather than in IE host enviroment to
confirm the accurate cause since there're not only one problem there. Do
you think so? Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #6
HI Steven

Thanks for the early reply

We have IE 6.0 on Win 98 system with all the latest Windows Update on the win 98 system.

Let me check with windows application first

Thanks
E
Nov 18 '05 #7
Hi EJ,

What about the test on using a WinForm client app? Does it have the same
problem connecting the remote database? If there is any new findings,
please feel free to post here. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #8
hi Steven,

Sorry for not getting back for quite sometime.

We are able to connect to SQL server from the Windows Control embeded in a webfrom running on a client sysytem, if and only if the 1433 port is opened up (SQL server Port). But since this is going to be a security issue, is there any other method to connect to the Database from the Windows Control embeded in a webfrom running on a client sysytem? Please can you help in regard at the earliest.

Also I have one more query, regarding how to know what version of MDAC is there in client system? or MDAC is installed or not on the system?

looking forward for the quick reply.

Thanks,
Vani

"Steven Cheng[MSFT]" wrote:
Hi EJ,

What about the test on using a WinForm client app? Does it have the same
problem connecting the remote database? If there is any new findings,
please feel free to post here. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #9
Hi EJ,

Thanks for your followup. As for first problem, generally the means that we
connect to a SQLServer server is configurable via the SQLServer's Network
Utility tool. There are serveral other Server Protocals we can use other
than the default tcp/ip protocal. You may have a look and here is the
reference on Network Utility tool in msdn:

#SQL Server Network Utility
http://msdn.microsoft.com/library/en...epl.asp?frame=
true

Also, as for how to check the MDAC component's version on a client machine.
Here is a kb article disscussing this and provide two means(1 use check
tool or manuall check the registry).

#HOW TO: Check for MDAC Version
http://support.microsoft.com/?id=301202

Hope also helps. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2138
by: Blake | last post by:
I have created an Access2K front end application that connects to a SQLServer2K backend. I use this vba code to create the connection from the Access app: Dim strConnect As String 'make sure all previous connections are closed: CurrentProject.OpenConnection "Provider=" 'create new connection string to server: strConnect = "PROVIDER=SQLOLEDB.1;INTEGRATED SECURITY=SSPI;PERSIST
3
1407
by: nzanella | last post by:
Hello, I have MS SQL Server running on a server computer. I am trying to connect to it via ASP from a .asp file created in a virtual directory. I am using IIS as the web server. I am connecting from a Windows 2000 computer. When I go to Start -> Settings -> Control Panel -> Administrative Tools -> ODBC Data Sources
1
1668
by: ehendrikd | last post by:
hi all im very new to using db2 so please excuse any obvious newbie questions :) my situation is this... we have a v7.1 db2 database running on redhat 9 and i am trying to use enterprise architect on a windows xp machine to create some diagrams of the database via odbc. i tried installing db2 8.1 personal edition on the xp to gain access to
2
1876
by: Matt Theule | last post by:
I need to be able to allow users to drag files to a list box on a web page. To this end, I created a Windows Control and hosted it in a WebForm. When the file is dropped onto the listbox, the path of the file is truncated down to 8.3 format (with the ~1 at the end). When the Windows control is hosted in a windows form (for testing purposes) the full path is displayed. Is there some setting that will allow the full path to be displayed...
12
2765
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed both the iis and sql server in a single machine. Not too long ago, the machine had some hardware problems, and management has decided to purchase new servers, for both asp.net and sql server.
9
2188
by: Nathan Sokalski | last post by:
I am trying to connect to a Microsoft Access Database from my ASP.NET Application. I use the following code to create my connection string: cmdSelect.Connection = New System.Data.OleDb.OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATASOURCE=" & Server.MapPath("/WebApplication1/nathansokalski_com.mdb")) Although the error does not occur until the Fill() method is called:
3
2007
by: Vinod R.Shenoy | last post by:
Hi All, Came across a post wherin you had helped somebody with a similar problem and was wondering if you could help us out with it. Our problem is , We have a development SQL Server 2000 (running on Win2K SP4) machine that we want to run on a Windows 2003 server machine and access it via our internal LAN. We have opened the firewall to allow our applications
1
1059
by: =?Utf-8?B?SmVmZnJleQ==?= | last post by:
After running DataGrid control and Binding control with an Access database successfully, I tried to run a Windows application on another Access database. This WinForm did show up; however, the first record was missing and all the database buttons didn't work. Later on I tried to run a WebForm (aspx) application with the second databse. Simiarly, a 'can not open the file' error msg showed up. I checked my database security properties,...
2
3032
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to connect via SQL Management Studio to the database server from the application server I get the same error. Here is the error:
0
7987
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8130
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8324
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3954
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4015
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2464
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1318
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.