WCF / ASMX :: Reading Data From Database Using Web Service

Apr 25, 2010

I have a requirement in which i have a database table which has 4 columns Id,Name,position,city.....now i have a form in which the user will be filling in the id and then the other three columns should auto populate ....now i want a web service which will make a data connection and get the Id from the form and then query the database and get the other three columns..i am pretty new to web services ..can somebody give me some heads up on how to achieve this...let me know if i have to provide more details.

View 8 Replies


Similar Messages:

WCF / ASMX :: Add Service Reference Reading Svc File But Not Reading Service?

Mar 10, 2011

I was trying to go through this tutorial:

[URL]

but when I tried to add the service reference to the silverlight app, the Add Service Reference window would show me that there was a service file, but the node wouldn't expand to show the rest of the files that contain the services and what not. I got this error instead:

"An error occurred during the processing of a configuration file required to service this request. review the specific error details below and modify your configuration file appropriately."

"Parser Error Message:There is no service behavior named 'AdventureWorks_WebServer.Service1Behavior'."

"Metadata contains a reference that cannot be resolved: 'http://localhost:55579/Service1.svc'.

The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.

If the service is defined in the current solution, try building the solution and adding the service reference again."

here's my web.config file:

[Code]....

View 1 Replies

WCF / ASMX :: Insert Data From A Web Service Into An SQL Database?

Nov 28, 2010

[Code]....

WEB SERVICE

[Code]....

Insert data from a web service into an SQL database?

View 5 Replies

WCF / ASMX :: Web Service Reading *.txt File .this File Contains Some Special Characters Like "?

Jan 21, 2011

In web service reading *.txt file .this file contains some special characters like "" .so its shows error while reading .

string fullPath = Server.MapPath("sample.txt");
string reconciliationData = string.Empty;
StreamReader ObjReconciliationDataStream = new StreamReader(fullPath, Encoding.UTF8);
string strReconData = ObjReconciliationDataStream.ReadToEnd();
ObjReconciliationDataStream.Close();
ObjReconciliationDataStream = null;
return strReconData;

above code i am using .

View 2 Replies

WCF / ASMX :: Class Library For Service (ServiceLibrary) To Access Data Form Database?

Jan 11, 2011

I created a Class library for WCS service (MyWCFServiceLibrary) to access data form my database. The database connection strings have been defined in Properties->Settings.settings. The endpoints are defined in the app.config. Tracing and logging is set to write to files on local server. This service is hosted by a .net web service. This webservice refrences the WCF service using MyWCFServiceLibrary.dll and MyWCFServiceLibrary.pdb. The web service is hosted in IIS. All this setup is working fine on the development environment.Now I want to deploy this in the QA environment. Since I am a newbie with WCF, I would appreciate some help on what needs to be done for deploying this on the QA server.1. Do I need to recompile the MyWCFServiceLibrary.dll after changing the connectionstring to point to QA database and tracing and loggint paths to the new server?2. Is there anything that needs to be done with end points or anything else?

View 1 Replies

WCF / ASMX :: The Maximum String Content Length Quota (8192) Has Been Exceeded While Reading XML Data

Dec 21, 2010

i am implementing the wcf webservice and using in my web application.

I am getting the error maximum string content length quota (8192) has been exceeded while reading XML data.

client side code :

[Code]....

WCF web.config

[Code]....

View 4 Replies

WCF / ASMX :: Get Data XML From Web Service

May 18, 2010

I´m new to web services and currently working with an integration to a third party system. I have created a web service that creates and exports a <List> of objects. The challange I have is that the third party company consuming my created web service wants to have the data as a XML document just as it is presented when I push the "Invoke button" when testing my web service on the server it resides on. Doing so I get all my exported data presented as a nice XML document. Since a web service actually exports this XML it should be a fairly simple task, but I do not know how? Would perhaps anyone have a code snippet consuming a web service and present the data just as an XML document? Or could point me to an example? I´m using VS 2008.

View 3 Replies

WCF / ASMX :: Create Web Service - How To Web Page Call Sales_Services.asmx

May 5, 2010

if i have the web application with many pages like add order page, edit order page, and delete order page actually they also interact with the Sql Server 2008 and i also create web service page call Sales_Service.asmx. i know just i need to put something like query into Web Method in Sales_Service.asmx but i have a lot of queries, i don't know which query i should put into it and how the web page call the Sales_Services.asmx

View 2 Replies

WCF / ASMX :: IIS Memory Increasing For Each Client Request In Asmx Web Service?

Nov 8, 2010

A customer reported that our asmx web service is continually increasing in memory (mem usage as well as private bytes). We are able to reproduce the problem in our lab with Windows 2003 Server SP2 (fully patched) on some of the machines. The customer is using Windows 2008.

We created a Hello World web service targeting the 2.0 framework built under VS2005 SP1 and a test client that continues to call it. The memory increases steadily - approximately 40K per client request. If the test app is paused, the memory remains the same. When it is closed, the memory drops. Explicit calling of GC.Collect does not drop the memory.

We have run the memory profiler on the service and the leak is all native memory. We have uninstalled/re-installed the Framework on one of the machines but no difference. To our knowledge all of the security and IIS settings are not modified. We have compared app pool, default web site and virtual directory properties to machines that have no problem and they are identical.

View 11 Replies

Reading A .csv File And Outputting Data To Database?

Jan 25, 2011

I have a csv file with 5 columns. I need to read this file using c# and have to write the contents to the table in database which has 5 columns to it.

if anyone know the code or steps to do this.

View 8 Replies

SQL Server :: Reading Data From .CSV File Into Sql Database

Jul 15, 2010

I urgently need to find a way of reading data from a .CSV or .xls(Excel) file into an sql database so that I can use it in my asp.net 2.0 application.

View 4 Replies

Databases :: Reading Excel Data To SQL Database

Sep 23, 2010

Using C# to develop an application.I need to upload data ( which is in excel) to a sql table.

[Code]....

View 1 Replies

WCF / ASMX :: Want To Delete The File Using The Same Web Service Where Stored That File In The Another Database?

Aug 9, 2010

I m accessing another application by consuming webservice of that application. I m sending file to store and retrieving file from other dabatase. Web service is the only to access another application.Now, I want to delete the file using the same web service where I stored that file in the another database.I m getting exception and I m unable to figure it out.

View 2 Replies

WCF / ASMX :: How To Call Asmx Web Service In A .net App From Classic Asp App Js File

Mar 17, 2011

I have a .net app developed in .net 4.0 version. And I implemented an asmx web service in this. Now I want to call one of the webservice method in another classis ASP application java script function.

View 2 Replies

WCF / ASMX :: First Data Web Service API Integration

Jan 27, 2011

I'm trying to use the First Data Global Gateway web service API. I was able to reverence the WSDL file in VS and get the classes to show up. I get the error "Object reference not set to an instance of an object." I can't figure out what I'm doing wrong.

[Code]....

View 8 Replies

Reading - Parsing And Posting Data From A .csv File Into A SQL Database

Jul 13, 2010

I have the following data that basically I only need a few bits of information from:

Resource:X - Y;Z - Ã…;Type:(all) From Date:
07/12/2010 - To Date 07/12/2010 Sort
by:Time Include Referring
source/physician:No Footer:Default
Criteria:None
","Appointments","X,
Y","ZAssociates","Monday, July 12,
2010","Time","Patient Name","Patient
ID","Appt. Type","Ref. Source/
Physician","Phone","Type","DOB
","Z, X","Y","7/12/2010
12:00:00AM","Time","Patient
Name","Patient ID","Appt.
Type","Phone","Type","DOB "," 7:30
[snip]

The only things I need from this are:

Patients Name
Drs Name
Patients Phone Number
Appt Time
Appt Date

and the rest of the information I can discard. A customer uploads this as a .csv file (even though it really isn't as you can see) and I'd like to parse the needed information and post that to my SQL database and discard the rest. I think I can do this with a dataset but I've never built that before. The fields from the customer will always be the same and the fields I will need will always be the same. Also, the date time has to be in the format of yyyy/mm/dd:hhmm and the phone number always has to have 512 as a prefix. Here is the code I currently have for my site:

Imports System.IO
Imports System.Data
Imports System.Data.SqlClient
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Submit1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim SaveLocation = "\xxxWEB3wwwrootWebfile1RemindersDoug_Ancildoug.csv"
If UploadFile(SaveLocation) Then
'the file was uploaded: now try saving it to the database
SaveToDatabase(SaveLocation)
End If
End Sub
Private Function UploadFile(ByVal SavePath As String) As Boolean
Dim fileWasUploaded As Boolean = False 'indicates whether or not the file was uploaded
'Checking if the file upload control contains a file
If Not File1.PostedFile Is Nothing And File1.PostedFile.ContentLength > 0 Then
Try
'checking if it was .txt file BEFORE UPLOADING IT!
'You used to upload it first...but the file could be a virus
If File1.FileName = ("doug.csv") = False Then
'The file is not the expected type...do not upload it
'just post the validation message
message.Text = "Sorry, thats not the correct file."
message2.Text = "Please locate and upload 'doug.csv'"
Else
'The file is a .txt file
'checking to see if the file exists already
'If it does exist Deleting the existing one so that the new one can be created
If IO.File.Exists(SavePath) Then
IO.File.Delete(SavePath)
End If
'Now upload the file (save it to your server)
File1.PostedFile.SaveAs(SavePath)
'After saving it check to see if it exists
If File.Exists(SavePath) Then
'Upload was sucessful
message.Text = "Thank you for your submission."
fileWasUploaded = True
Else
'the file was not saved
message.Text = "Unable to save the file."
End If
End If
Catch Exc As Exception
'We encountered a problem
message.Text = "Your file was not in the correct format. Please contact Customer Service at xxxx-xxxx-xxxx."
End Try
Else
'No file was selected for uploading
message.Text = "Please select a file to upload."
End If
Return fileWasUploaded
End Function
Private Sub SaveToDatabase(ByVal SavePath As String)
Try
Dim sqlQueryText As String = _
"BULK INSERT dialerresults " + _
"FROM '" & SavePath & "' " + _
"WITH ( FIELDTERMINATOR = ',' , ROWTERMINATOR = '
' )"
' and bulk import the data:
'If ConfigurationManager.ConnectionStrings("Dialerresults") IsNot Nothing Then
'Dim connection As String = ConfigurationManager.ConnectionStrings("Dialerresults").ConnectionString
Dim connection As String = "data source=10.2.1.40;initial catalog=IVRDialer;uid=xxxx;password=xxxxx;"
Using con As New SqlConnection(connection)
con.Open()
' execute the bulk import
Using cmd As New SqlCommand(sqlQueryText, con)
cmd.ExecuteNonQuery()
End Using
End Using
'Else
'message.Text="ConfigurationManager.ConnectionStrings('Dialerresults') is Nothing!"
'End If
Catch ex As Exception
message.Text = "Your file was not in the correct format. Please contact Customer Service at xxxxxxx."
End Try
End Sub
End Class

View 1 Replies

WCF / ASMX :: Running A Web Service User Service / Domain Account?

Mar 28, 2011

Is it possible to run a web service as a particular user/service account in the same way a Windows service can?I have a service account used for connecting to the DB and want to run the webservice under this account as the users using the webservice won't have DB access.The way I see to do it is to include the Impersonate option in the Web.config file, but is there any better way to do this?

View 1 Replies

WCF / ASMX :: Create An Instance Of Web Service Without Adding Web Service Reference?

Mar 17, 2011

How to create an instance of web service without adding web service reference? How to identify the server address/name where the web service is hosted from C# code?

View 1 Replies

Unable To Pass User Credentials From WCF Web Service To ASMX Web Service

May 25, 2010

My WCF Client calls my WCF Service which then calls ASMX Web Service. The problem is i have configured my wcf client and wcf service to windows credentials type but when wcf service calls asmx service the user credentials (default windowsidentity) is not passed to asmx service.

In WCF Service i am able to get user identity by using : Thread.CurrentPrincipal.Identity.Name;
WCF Service - i have disabled anonymous access and enabled windows authentication. ASMX Web Service - i have disabled anonymous access and enabled windows authentication.
WCF Service Config
[Code]....

View 1 Replies

WCF / ASMX :: How To Call Web Service Hosted In Window Service And Having End Point Over Tcp

Aug 4, 2010

i have created a normal web service and i want to host it outside IIS. one idea i got is to use window service as hosting environment. i have created a web service and hosted it window service and its window service is running now.would anybody please let me know that how can i call web service hosted in window service binded over soap.tcp. here is my sample code.

[Code]....
[Code]....

View 1 Replies

WCF / ASMX :: Develop A Web Service That Handle Another Web Service's Event (C#.Net 3.5 Framework)?

May 26, 2010

I want to develop a web service that handle another web service's event. (C#.Net 3.5 framework)

View 1 Replies

WCF / ASMX :: Web Service To Retrieve Data In Excel?

Dec 21, 2010

I need to write a web service which will generate excel file by using the records present in the database or depending upon the query fired.

So how should I try this?

View 2 Replies

WCF / ASMX :: Sort Data Returned From Web Service?

May 12, 2010

I have a web service that returns an object that I attach to a gridview's datasource. is there a way to sort the data from the web service before attaching it to the datasource?

[Code]....

View 4 Replies

WCF / ASMX :: Merge Using JQuery With Data Service

Aug 26, 2010

I'm a bit new to the whole asp.net thing so this is probably a silly question, but here it goes: I have created a WCF Data service based based on a ADO.net Entity--it's very basic:

[Code]....

View 1 Replies

WCF / ASMX :: How To Get Data From An Asynchronous's Service Call

May 12, 2010

I have an process that take about 15minutes to execute. And i have toput this process in a service, and managed his statWell, i placed this process in a service and in some specific pointi have one variable telling me how much % the process have done.So my service reference im my consumer project its typed to let asynchronous calls.When i start my process with a

[Code]...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved