WCF / ASMX :: Can Access Referenced Web Service From Web Form Code Behind But Not From A Class In The Same Web
Jun 16, 2010
Web service is referenced fine (called "tuWs") and I can refer to it in standard web form code behind:
Dim myWs As tuWebSvc.tuWs = New tuWebSvc.tuWs
View 3 Replies
Similar Messages:
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
May 15, 2010
I am a newbie to ASP.NET (but not to C#)I have a project I am developing that may seem unconventional at this point but it is a project that I hope to eventually expand and provide a new type of service on the internet. Currently the project makes use of an Excel spreadsheet that is generated by another application I wrote. Basically the spreadsheet is an index to a specific type of file that exists on a host computer and the files are directly linked from within the excel document. When the link is clicked it opens the file using the operating system default program which then processes the file (this takes some time).
This is fine and dandy but when I click on another file, the default program immediately stops processing one file and opens the latest submission and thus interrupting the previous job. To prevent this I am now writing a queuing application. Here is where ASP.NET comes in. I do not want the link to open the queuing application with the file to add into the queue as a parameter because that pops one or more nnoying/scary "you are opening an executable" dialogs and because I want to be able to access the queuing service from a remote computer, and possibily in the future over the web. Instead I am trying to use an ASP.NET service application that will accept the name of a file as a parameter, access the external queue class (defined in an external dll of which only one universal instance is allowed), and add the request to the queue. Whether or not the table is an excel table or on a web page, using a form in this instance is tedious, not only for me but for a user. I want the user to be able to simply click on an html link and have the file be queued without anything except maybe a confirmation page pop up saying that the file has been queued and it will take x amount of time before the file is finished processing.
My problem is I cannot for the life of me find a way to do this. I have searched the interenet for over a week now looking for a way to call a "WebMethod" using a link and I am getting the impression that it cannot be done. Even when I use a form and try to have the form pass a string (representing the file name) as its "action" it comes up with an application error saying that I am missing the parameter I am trying to pass. Here are some examples of what I have tried:Here an example method I would try to access:
[Code]....
Here is an example of how I tried to access directly by way of a link (which results in an application error: InvalidOperationException)"
[Code]....
View 3 Replies
Nov 18, 2010
How to access proxy class of a web service which has been referenced in the website project of a solution within a class library project in the same solution?
I mean no web-service reference/setting is added to the class library and instead it needs to be picked from the web project.
View 1 Replies
Apr 25, 2010
i am trying to bind data to a datagridview control on an ASPX webpage and am using something like this..
<asp:TemplateField HeaderText="MyField">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "MyField") %>
</ItemTemplate>
</asp:TemplateField>
the problem i am having is that the data for the 'MyField' field is actually an integer that is a reference to a string value in another sql table.
Does anyone know how i can reformat my code line above to show the string value instead of the int value?
View 1 Replies
Jan 18, 2011
If i want to use Property & Method in same class then how to use it. I want to keep separate class only for interface , not for property.
Also we have tried with [OperationContract] before get ,set in Service class . it solved our issue but throws error while run a .svc file
View 1 Replies
Apr 19, 2010
I've created a class library, now I'm trying to use it in a webservice.If I try and use it via a web method like this:
<WebMethod()> _Public
Function GetStaffList()
As List(Of ClassLibrary.Staff)
End
Function
I get this error:You must implement a default accessor on System.Security.Policy.Evidence because it inherits from ICollection. And I can't seem to find any coherent instructions on remedying this issue.If I copy the Staff class into the web service (app_code) it works hunky dory, so it must be security..I can't be the only one attempting this! MSDN doesn't explain this one too well :(
View 3 Replies
Dec 17, 2010
We are consuming third Web services.
Instead of using datatypes from web service proxy we need to create our own class which will take the values from web service output.
Since the web service data types are so much deep,we are facing lots of problems to create our cutom classes.
Is there any tool available to create classes directly from web services in ordered way....
View 2 Replies
May 3, 2010
I have an ASMX Web Service that has its code entirely in a code-behind file, so that the entire contents of the .asmx file is:
<%@ WebService Language="C#" CodeBehind="~/App_Code/AddressValidation.cs" Class="AddressValidation" %>
On my test machine (Windows XP with IIS 5), I set up a virtual directory just for this ASP.NET 2.0 solution and everything works great. All my code is separated nicely and it just works.However, when we deployed this solution to our Windows Server 2003 development environment, we noticed that the code only compiled when all of the code was dropped directly into the .asmx file, meaning that the solution didn't work with code-behind. We can't figure out why this is happening.
One thing that's different about our setup in our development environment is that instead of creating a separate virual directory just for this solution, we dropped it into an existing directory that runs a classic ASP application. So here we have a folder with an ASP.NET 2.0 application within a directory that contains a classic ASP application. Granted, everything in the ASP.NET 2.0 application works if all of the code is within the .asmx file and not in code-behind, but we'd really like to know why it's not recognizing the code-behind files and compiling it correctly.
View 3 Replies
Mar 23, 2011
I have a web service called service1. Is it possible to pass the parameter related to the service to a class library so for e.g.
Service1.service ws = new Service1.service();
Service1.UserDetails ud = null;
now if I call a method that exists in a class and pass ud. Cam i do that because I am trying to do this and I am getting an error. Do i need to add a web
reference to this service in the class library My method call is like this
authenticateUser.Authenticate(ud, UserName);
and in the class libary I have
public void Authenticate( Service1.UserDetails ud , string UserName)
{
}
View 3 Replies
Feb 10, 2011
I have an asmx web service, and every time I try to call a static method in another project (which is a class library), I get an internal server error 500.
View 3 Replies
Apr 28, 2010
when svc.getLookupList(reqobj) will call i get following error.
"There was no endpoint listening at http://rets.newjerseymls.com/rets that could accept the message. This is often caused by an incorrect address or SOAP action."
View 3 Replies
Nov 1, 2010
How to implement form authentication wcf service?
View 1 Replies
May 24, 2010
I have a class (name PageBase) that is inhariting System .Web.UI .Page and all my .aspx page behind classes are inhariting this class. This way I have put some common things in PageBase class.
For showing errors I want to put showMessage funtion in PageBase as well so that I may have not put it in every page and it will easy to manage this way.
Probem is that how PageBase class will access a control which is in aspx page in its child class (child class of PageBase) .
I dont want to pass control as argument to function in parent class, is ther any other way ?
View 7 Replies
May 24, 2010
I want to access simple web service inside WCF service. How can i achieve it?
View 2 Replies
Jun 9, 2010
Im using VS 2008, 3.5 framework I want to use wcf, but javascript cant access to myservice.svc error : Message: 'MapService' is undefined;
calling mapservice ;
function getselectedIl() {
var firstLetter =
"caglar";
var proxy =
new MapService();
proxy.GetSuggestions(firstLetter);
defining mapservice;
<asp:ScriptManager ID="ScriptManager2" runat="server">
<Services>
<asp:ServiceReference Path="MapService.svc" />
</Services>
</asp:ScriptManager>
mapservice.svc.cs;
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class MapService
{
[OperationContract]
public string GetSuggestions(string firstLetter)
{
return "basarili";
}
}
View 6 Replies
Jun 29, 2010
I'm getting a strange data download from an Access database.Using Visual Web Developer 2010 Express, I created a web service that places records from an Access database in server cache and then reads the records, one at a time, from the cache. The data in the records is converted to a delimited string. The web service is called from an e-learning program called Toolbook that places Http Post calls to the web service. The web services uses vb and .Net Framework 2.0.
All works correctly with one exception. When a record in the Access db contains "&", it is downloaded to the Toolbook e-learning program as "&". If I place && in the record, I get "&&".If I download the data from the Access db using a classic.asp file rather than the web service, the "&" displays correctly.
View 2 Replies
Oct 29, 2010
Actaully i am careted one webservice name:service1,created one more class name: service2 this poperty class for webservice,My question is
1.How to access that property class in client side?
2.It's possible to create Layer archt. Inside the webservice?
View 4 Replies
Oct 3, 2010
I get this error when trying to access a self hosted wcf service...
[Code]....
Can someone explain what I need to do to get this to work, I do not have any cross domain policy file. And don't know how that is supposed to look like.
View 1 Replies
Sep 8, 2010
am new to webservice accessing from javascript.I call a webmethod from javascript which returns a string array. whith this array i bind a dropdown list at client.At dropdownList selectedIndexchanged event I found there is no item in DropDownList. Is there any way how to bind the DropDownList using webMethod so that on postback i can get the dropdowns item.
View 3 Replies
Feb 4, 2011
I have a web service which is accessible from the browser. When I try to access the same web service which is hosted on Windows Server 2008 R2, from an excel Macro, it says
Run-time error '-2147220991' (80040201)':
Server was unable to process request --> The request failed with HTTP status 404: Not Found.
The excel macro works fine when I try to access the same web service on the other server(Windows 2000 Server)
The web service is developed using .Net 2.0.
I'm posting the URL for the web service for your reference.
URLs which are not being accessible from Excel.
[URL]
[URL]
URLs which are being accessible from Excel.
[URL]
[URL]
Both Web services and Excel macros are old applications which have been running fine for years. The only change is that the application is being migrated to a new server(MCDEAGDWEB202) which has Windows Server 2008 R2 and SQL Server 2008.
The Old server(MCDEAGLWEB005B) has Windows Server 2000 and SQL Server 2000.
View 4 Replies
May 28, 2010
I have added a web service as a reference to a windows application using "AddWebRefrence" option. And I am unable to access the funtions in the web service but instead i get the functionnames followed by the completedeventargs and completedeventhandler.
What am I doing wrong and how can i access the funtions in the web service.
View 3 Replies
Aug 4, 2010
have two different applications. The only access between those two applications is Web Service.I want to delete records in the another application database by passing primary key of that table.I don't have access to database where I have to delete the records.For this, where I have to write the delete functionality.? In web service or or in my application.
View 14 Replies
Apr 29, 2010
How to Access Webservice Webmethod in Javascript
View 4 Replies
Oct 26, 2010
[Code]....
this method i can access using asp.net but not by using a android.. i have checked for the headers etc.. the response is OK in android while debugging but the data is not inserted..
what is the equivalent of stringbuilder in android??
in android i use
StringEntity se = new StringEntity(json.toString());
//and post the data to my service...
post.setEntity(se);
what is the equivalent of stringentity in C# and what can i do for this prob?
View 2 Replies