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


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

How To Remove Special Characters In File Name During File Upload

Jan 15, 2010

I'm using the file upload control to enable users to browse to a document, and then upload it. But, I've run into a problem. Some users include a # sign in the file name... Something like "file#123.pdf" The file uploads ok, but, when another user trys to open the uploaded document from the gridview, it errors. If I manually rename the file and remove the # symbol, the file will open ok. How do I prevent users from uploading a file with a # sign in it, or how do I strip out that symbol?

View 2 Replies

Localization :: Reading Special Character From A Flat File

Jul 8, 2010

I have a flat file with text that has a special character like this: "RIBAŽ Generic Strip Labeling." so the registerd symbol is coming as square when i am simply reading the file in c#. is there a way to read the symbol as is and print on screen? i am working in on a console application. Also other german characters, not all but a few are showing as squares as well.

View 3 Replies

Jquery - JSON Can Call Method In .aspx File But Not In .asmx (web Service) File

Jul 3, 2010

I am using JQuery & JSON (POST) to call webmethod. However I can call only webmethod located at aspx file but not in asmx file Below are sample codes

CustomValidate.asmx
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
Public Class CustomValidate
Inherits System.Web.Services.WebService
'ACCESS VIA JSON
<System.Web.Services.WebMethod()> _
Public Shared Function AJAX_Test(ByVal date1) As Boolean...
Return True
End Function
End Class
Javascript: JQuery JSON
function isDates(source, arguments) {
var isValidDate;
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "CustomValidate.asmx/AJAX_Test",
data: '{date1: "' + arguments.Value + '"}',
dataType: "json",
async: false,
success: function(result) {
isValidDate = result;
},
error: function(httpRequest, textStatus, errorThrown) {
alert("status=" + textStatus + ",error=" + errorThrown);
}
});
arguments.IsValid = isValidDate;
}

It always return javascript undefined error. But if I put the AJAX_Test webmethod in aspx page and replace the url: "CustomValidate.asmx/AJAX_Test" to "mypage.aspx/AJAX_Test". It works fine.

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

Web Forms :: Automatic File Reading / Check For New File Everyday And If The New File Is In The Folder Read It

Sep 20, 2010

I would like ask you for some ideas how can I write mechanism that will be automatically read files from folder. I don't know how to schedule the write task. I want to check for new file everyday and if the new file is in the folder read it.

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

Saving A File Into Special Folder When File Is Downloaded On Users Machine

Jul 2, 2012

I need to save a file into special folder.

if (TextBox1.Text == s)
{ MessageBoxResult mbr = MessageBox.Show(this, "Do you want to save file?", "saved", MessageBoxButton.YesNoCancel); // if (mbr == MessageBoxResult.Yes) // { // //string path = string.Empty; // string path; // path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "abcFile"; // if (!Directory.Exists(path)) // Directory.CreateDirectory(path); // }

It creates a folder abc if it doen't exist, i need to save s where s is a textfile.

View 1 Replies

WCF / ASMX :: Publish A Web Service From A Wsdl File

Aug 8, 2010

I have a wsdl file which are the definition of several methods of the web service associated . I want to create this web service in order to consume it through a Java web service client.How i could do this?

View 1 Replies

WCF / ASMX :: File Protection / Availability In A Web Service?

Oct 5, 2010

I wrote a small web service (asmx) to write stuff to a file on the server. It works fine when run in the VS2008 test container. But when I run it under IIS on a remote machine, I get:

System.IO.DirectoryNotFoundException: Could not find a part of the path 'y:grahammiscprops.txt'.

'y' is a mounted drive on both the test and remote machines. The path really does exist. It works on the test machine; not remotely. So:

Is it the fact that 'y' is a mounted drive causing it to fail remotely? or Is it the fact the the path lies outside of the web application directory structure? Is there something I should put in web.config??; or

Is something else the problem? I would have thought that the service running on the server could do anything it wanted! It's not denying me access to the file; it's saying it can't find it??!!

View 1 Replies

WCF / ASMX :: Web Service Not Correctly Using File.Exists()?

May 26, 2010

I have a large web application that uses File.Exists() in a global file utility class flawlessy for several years now. I just built a new ASMX web service that calls that same method in our file utility class, and it returns False for the same exact file paths that are being passed in the web application. The paths are absolute system file paths, and they match on both the web service and the web app.I am confused... Why might this happen? The method I am talking about is only a few lines of code. A couple of lines simply validate the file id parameter being sent into the method. The last remaining line is this:

[Code]....

The previous line of code calls another method that uses a String.Format to insert the file id into the file path. That's it.

View 5 Replies

WCF / ASMX :: Web Service To Make Use Of Resource File?

Oct 22, 2010

I've been trying to get my Web Service in my wcf project to be able to reference the resource objects in my resource file but to no avali.Please kindly advice and assist on what went wrong.

View 1 Replies

WCF / ASMX :: Upload Xml File To Wcf Service And Validate That Data

Jan 19, 2011

I am new to wcf . I want to implent one wcf service like upload xml file from cient to wcf service .

View 2 Replies

ASMX :: How To Write Self Hosting For Wcf Service With Multiple Svc File

Dec 23, 2010

How to write self hosting for wcf service with multiple svc file ServiceHost myServiceHost = null;

View 1 Replies

WCF / ASMX :: How To Read Or Download The Content Of The Zip File From The Service

Apr 20, 2010

I am downloading the project from the webservice which contains the zip file embedded in the Soap XML.

I want to read or download the content present in the Zip file.

I am using C#.

View 4 Replies

WCF / ASMX :: Trying To Create A Web Service That Can Check A Location For File

Oct 21, 2010

I am trying to create a web service that can check a location for file and if available get the contents.

Also this web service has to upload the file using ftp after making changes locally.

Any pointers in this direction.

View 1 Replies

WCF / ASMX :: Generate Web Service From KEGG Wsdl File In C#

Dec 6, 2010

I would like to read the WSDL file from KEGG [URL] in order to use the

[Code]....

View 2 Replies

WCF / ASMX :: Store A Pdf File On Client Machine Using A Web Service?

Feb 23, 2011

I need to store a pdf file on client machine using a web service.

I am unable to find IP address of client machine in web service so that I can insert pdf file in C-drive of client machine.

I am using asp.net 3.5 using c#.

View 2 Replies

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

WCF / ASMX :: Adding Reference To Web Service Do Not Copy The .config File?

Jul 8, 2010

I am adding a reference of class library in web service in VS2008 and it is not copying the .config file from class library to web service. I have checked the property "Copy to output directory" of .config file and its value is "Copy Always".

View 3 Replies

WCF / ASMX :: Need Details On Returning An Entire Existing XML File From A Web Service?

Jan 20, 2011

I've been reading quite a few tutorials on web services and xml files and one thing isn't quite clear to me. If I want to create an XML file on the fly the tutorials are pretty straight forward but, I want to grab an existing XML file from the web server and return the whole thing. Do I need to read the XML file and send each individual node or is there a way to send the file all at once? The tutorials imply that the whole file could be a node but I'm not clear on what that entails or if it would work. Also do you have a link to an example?

View 1 Replies

WCF / ASMX :: Convert WSDL File To Service Contract Interface?

Feb 15, 2011

I would like to convert WSDL file to Service Contract Interface (WCF).

View 1 Replies

WCF / ASMX :: Create Web Service From WSDL File (top Down Approch For Web Services Development)

Jul 7, 2010

I have a WSDL, and I need to write this web service. (I am not the client, I am the provider of this service) Is there any tool and/or best approch to create this Web Service?

View 1 Replies

Databases :: Upload Ms Word File And Store It Into Database Then Reading The File?

Jan 12, 2011

i like to create a web application,in that i need to get the resumes from the user,then i need to publish that resume to the manager in date wise..

View 5 Replies







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