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

G

Guest

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
 
S

Steven Cheng[MSFT]

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.SqlClient 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
 
G

Guest

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
 
S

Steven Cheng[MSFT]

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
 
G

Guest

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
 
S

Steven Cheng[MSFT]

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
 
G

Guest

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
 
G

Guest

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
 
S

Steven Cheng[MSFT]

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-us/adminsql/ad_1_server_2epl.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top