|
Hi,
I would like to know how to call the webservice (SOAP\HTTPS) over https connections in c#, please point me to the article.I'm finding articles for http but not for https.
Thank you
Mohan
|
|
|
|
|
My project involved on development N-tier architecture. Which is my client will be connect to the application server using SOAP/CORBA. I did not really understand how web services actually works.
A lot of example that I downloaded is not help me to proceed to the development phase.
Anybody know where can I refer on webservices and n-tier application?
please help. Thanks.
|
|
|
|
|
SOAP is just an XML format for passing data through HTTP. A web service is just an app that passes SOAP, and, through that, uses the web to provide functionality that is business layer orientated ( in that there's no pages, no view ).
CORBA is dead. I can't believe anyone is using it.
Neither webservices, or CORBA, are needed to write n-tiered apps, that just means that the database, the business logic and the presentation layer of the app are seperated from one another, not all in the one project.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Chris,
Thanks for the reply.
I am working on Application Service Provider (SAP) project. We already developed Windows Application (.NET) which is 3-tier architecture. The requirement is to developed JAVA web application to connect to existing .NET Application has been developed.
My finding was, there is a way to enable JAVA app to access .NET app using .NET web services. But it a bit tedious to develop. I don't know what is the best solutions.
Why we need to do Java client, instead of ASP.NET, because ASP.NET unable to communicate to the external client hardware (RFID device etc.).
Please advice. Thanks.
|
|
|
|
|
A web service is your best bet, and on the .NET side, trivial to develop. Dunno about the Java side.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
I have a simple web page that is able to access several servers, I just set up the conection string based on a radio button list as in the following example:
Select Case RadioButtonList1.SelectedItem.Value<br />
Case "GlobaldbIBE"<br />
sqlConnString = "Data Source = 222.8.249.18; Integrated Security = False; User ID = sa; Password = ; database = GlobaldbIBE"<br />
Case "oht_dbIBE"<br />
sqlConnString = "Data Source = 222.8.249.18; Integrated Security = False; User ID = sa; Password = ; database = OHT_dbIBE"<br />
Case "KESM"<br />
sqlConnString = "Data Source = 221.14.69.102; Integrated Security = False; User ID = pad; Password = pad; database = dbIBE; Connect Timeout = 60"<br />
Case "Tianjin"<br />
sqlConnString = "Data Source = 10.192.144.21; Integrated Security = False; User ID = sa; Password = ; database = dbIBE; Connect Timeout = 60"<br />
Case "TTM"<br />
sqlConnString = "Data Source = 10.239.212.112; Integrated Security = False; User ID = sa; Password = ; database = dbIBE; Connect Timeout = 60"<br />
As far as I can tell all the servers are configured the same. I can go the the control panel on my computer and add an ODBC connection to any of the servers (using the same connection info), no problem. I can open the enterprise manager and connect to any of the servers, no problem. When I try co connect through the web application one of them fails "access denied or server does not exist"
What would be different about the way I can access the server but my web application can not? Does the web application run in a different context? why woudl that only impact one server?
The only thing I am scratching at now would be that with Enterprise manager I do get a message "code pages do not match" not sure if that is realted or not....
Any help appreciated...
|
|
|
|
|
Have you tried ping the ip address from the web server. Perhaps your web server can not reach one of the sql servers.
Ben
|
|
|
|
|
Yes I can ping it from the web server and from my development station. I can also map a drive, access it through Enterprise manager and a standard ODBC connection..
Mike
|
|
|
|
|
Have you double checked the username and pasword. Perhaps it would be helpful to have the actual error message.
Ben
|
|
|
|
|
Yes, I have double checked the user name and password, I even changed it to use the "sa" account with no password as in my example.
I just tried to run it to verify the error text exactly and it ran just fine... what the hey? I did not change anything... hrmph....
thanks for you help....
|
|
|
|
|
No-e,
I sure hope the connection strings you posted didnt contain the REAL IP address of the servers since you also have shown the username/password values. Second, this wont fix your problem but I would put those connection strings in the web.config then have a function to extract the correct connection string based on the value selected in the radio button group.
" In the next millennium there are two kinds of business, those on the Internet and those out of business"
Bill Gates
"Be nice to nerds. Chances are you'll end up working for one."
Bill Gates
"Let's face it, the average computer user has the brain of a Spider Monkey."
Bill Gates
|
|
|
|
|
Thanks, trust me the names were changed to protect the innocent. I am reasonably new to this, can you provide a very brief primer on how to use the web.config file? (or point me to a resource that explains it?) I did not realize this was an option....
|
|
|
|
|
No-e,
In your web.config add a connectionStrings section right below the <configuration> and <appsettings>:
<connectionStrings>
<clear/>
<add name="ADConn" providername="System.Data.SqlClient" connectionstring="Data Source=YourDataSource;Integrated Security=true; Persist Security Info=True;User ID=YourUserID;User Instance=true"/>
</connectionStrings>
Then create a function to extract the connection string you want like so
Public Shared Function GetConnectionString(ByVal strConnection As String) As String
Dim strReturn As New String("")
If Not String.IsNullOrEmpty(strConnection) Then
strReturn = _
ConfigurationManager.ConnectionStrings(strConnection).ConnectionString
Else
strReturn = _
ConfigurationManager.ConnectionStrings("YourDefaultConnection").ConnectionString
End If
Return strReturn
End Function
" In the next millennium there are two kinds of business, those on the Internet and those out of business"
Bill Gates
"Be nice to nerds. Chances are you'll end up working for one."
Bill Gates
"Let's face it, the average computer user has the brain of a Spider Monkey."
Bill Gates
|
|
|
|
|
Hi,
Check this out.
In web.config file
add key="conn"
value="Server=<servername>;Integrated Security=no;User ID=<user>;PWD=<pwd>;database=<dbname>" />
code-behind file
string ConnectionString =System.Configuration.ConfigurationSettings.AppSettings["conn"];
-- modified at 8:32 Thursday 26th April, 2007
Regards,
Manowj
|
|
|
|
|
Hi Guys,
How can I get the record count of SqlDataReader? Or do you have any other idea?
Below is my asp.net code
Thanks in advance
Dim strConnString As String = ConfigurationManager.ConnectionStrings("MyConnectiStringHere").ConnectionString
Dim sqlConnection1 As New Data.SqlClient.SqlConnection(strConnString)
Dim cmd As New Data.SqlClient.SqlCommand
Dim reader As Data.SqlClient.SqlDataReader
Dim ds As Data.DataSet
cmd.CommandText = "Select * From tblCategories"
cmd.CommandType = Data.CommandType.Text
cmd.Connection = sqlConnection1
sqlConnection1.Open()
reader = cmd.ExecuteReader()
If reader.RecordsAffected > 0 Then
MsgBox("have records")
End If
reader.Close()
sqlConnection1.Close()
hifiger2004
|
|
|
|
|
With a datareader, you don't know how many records you've got until you reach the end. To get the count, you would have to increment a variable. The alternative is to read the data into a DataTable/DataSet and get the information from the Rows.Count.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
If you only want to know the number of records, count them in the SQL query:
"select count(*) from tblCategories"
That way you will only get the information you want from the database, instead of all the data in the entire table.
---
single minded; short sighted; long gone;
|
|
|
|
|
This is a slightly dangerous technique because the select of the records could actually return a different number of records because of CRUD operations.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
What do you mean?
---
single minded; short sighted; long gone;
|
|
|
|
|
If you do a select count on a busy database, by the time you do your actual select of the records the criteria may return different results because of inserts, updates or deletes. I've seen too many systems make this assumption, which works fine when there are only one or two users, but when it ramps up to 1000 users then things get a little bit screwy.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
But that is a whole different can of worms....
Brad
Australian
- Me on "Public interest"
If you actually read this let me know.
|
|
|
|
|
Pete O`Hanlon wrote: If you do a select count on a busy database, by the time you do your actual select of the records the criteria may return different results because of inserts, updates or deletes.
Yes, of course, but it makes no difference if you select all records and count them, or if you count the records. The result is equally outdated when you get it.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi Guys,
I think it's the same thing when using the "select count" or rows.count. And I am sure if there are a lot of users out there accessing and doing transactions at the same time, then for sure not all of them will do the same function "delete". I hope not
Anyway, either I will be using a Select count or rows.count, both will work for me.
Right now, I am using the code below:
if ds.Tables.Item(0).Rows.Count > 0 then
do process....
end if
Thank you Guys.
hifiger2004
|
|
|
|
|
Hi All,
How to Find the Flash version in client's PC? We are developing Flash chat application, in that we have to check Whether the User having Flash when they access our chat application,
So plz help me how to find the version.
Thanks in Advance
|
|
|
|