Architecture :: Using .asmx (web Service) Files Locally Within Web App As The Datasource?
Jan 5, 2011
I have been wrestling with web services technology/techniques for part of 2010 - learning how to reate/consume/deploy... I have also been experimenting with third party web controls from ComponentArt. In some of the samples from ComponentArt I observed that they use .asmx files locally to populate their custom data controls (datagrids, comboboxes, treeview controls...). What is interesting (and a little bit confusing to me) is that in the ComponentArt samples they reference the web services directly within their controls in the markup. My question is if this can be done normally with controls that ship with Visual Studio (any version -- I have em all 2005, 2008, 2010). I ask this question because from VS I only know to reference web services by right clicking on the project in the solution explorer to add a web reference.
Then in the property grid of a data control -- say a treeview control-- they reference the web service, and when the project is run -- the control is populated with data from the web service.
Do data controls from VS support this technique? My other question is if there is a benefit to using a web service as a datasource for a control and what is this benefit? What is the criteria for using a web service in this manner?
I developed a web service in VS2010 on my local machine, wrote a consumer of it also locally, and that all works.
I copied the dll and the asmx file to our server, and I am getting an error when I try to invoke it from a browser (also still on the server machine) to make sure it correctly exposes its web methods, but it is not, it is saying "Could not create type 'Service'". That error comes from this line:
Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/WarrantyDuplicate.cs" Class="Service" %> There other web services in the same folder on the server that all work fine so I don't believe it's an IIS setup thing.
This is my first web service in C# and when I created it in VS I did think it odd that the code behind file went into App_Code (as you can see from the line in the asmx file) and is just named dot-cs rather than asmx-dot-cs. But since it worked fine locally, I wasn't sure that mattered.
I have to define a web method which will fetch XML documents from another web service based on the list of projects from the database. Now I need to send these XML documents in different SOAP envelopes. XML documents can be more than one.
I have developped an asmx webservice with visual studio and I deploy on IIS 7 which has 3.5 Framework by copying all the files.
When testing it says
Could not load file or 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I don't use [System.Web.Script.Services.ScriptService] so I don't understand why it tries to load System.Web.Extensions.
Note: I'm not using any other assembly/lib I'm just learning webservice so it's very simple: I create a webservice Test.asmx with one method which uses one class Test.cs within same namespace WebServiceTest. This works locally.
I am using some webrefernces for reporting services. The first time they load they are really really slow. Is there any way to reference the files locally?
When I deploy my web service, I get the following error:
There is no build provider registered for the extension '.svc'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.
I found one thread ([URL] that a solution but, I can not get it to work. If I make the changes to my web config file as in the thread, I then get a configuration error. One odd thing is that, if I check the machine.config file on my machine, located at C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIGmachine.config, I don't see any of the config settings described in the thread. As a matter of fact, there is no mention of "compilation" or "buildProviders" at all.
We have a web service running live. Last week, we pulled the source code down to my machine and successfully built it.
My goal is to become familiar with this code and document it. My problem is that I am not sure how to get it running locally.
First of all, I have to configure it in IIS or something? How do I do that, and is that indeed the right place to begin? I tried creating a consumer in a separate VS solution, and when I said browse for local web services it said "Active Directory Services cannot find the web server."
I tried this link, but got lost when it said "3.Under Visual Studio installed templates, click ASP.NET Web Service." because I don't have that template.
i want to create a centralised business or Service authendication architecture in .net. for example, we have a clients like c1, c2, c3, c4, ... etc. everybody logins seperatly as well as grouply. ie, if client "C1" logins [with login authentication] he can access c2 , c3, c4 also without login authendication. So its like a google. if we enters gmail account, we can access orkut, picasa like that.. i need the cetralised architecture.
And, client "c1" seperately asks seperately how will be the authendication architecture.
so give me the single solution for both these two scenarios. how will be the architecture for these two and how is the Data Base (Login) Structure.
I need to create a asp .net web application which should have several forms to get the survey data, When the user is out of the wifi or don't have internet access to connect to the server even though the user should have access to the forms or any other tools to input data and store them locally and sync to the database later. What are the options available to do this kind of tasks in asp.net / C# / Sql Server
I am going to create the SAAS (Software as a service) Application. Can you please provide all the attributes that we have to consider in SAAS application (for example usability, pluggable architecture etc .. )
How architecture should be build for this project, provide sample architecture for SAAS application. This architecture should be easy to upload and upgrade or degrade the features. Error handling should be easy.
I am try to create architecture design for WCF service.
We have WCF service that we have to expose to third party so then can request with xml and get back xml response.
The wcf service should do the following:
- Accept the request call with xml
- Check xml against the schema
- Parse the xml
- Authenticate the incoming xml by username and password that will be in xml
- Send back the response
If anybody can let me know what kind of design I can use or is there any pattern available that I can take it and then extend it as per my requirement.
I am not sure which approach I should use. I have a web application that needs to get/receive data from a third party application that is in a secure remote network. The data needs to be secure during transport. The data layers cannot be exposed and the databases will not talk to each other. The data will be received from remote application on demand, or will get at scheduled intervals.
I have looked at WCF, but not sure if this will work. Can a WCF service be used to receive data as needed from a remote sender or service? Is this a secure way of doing it? I have also looked at SFTP using some XML/XSLT, but I don't think this is the right way to go. In addition, some data may be transported from my web application to the remote application (mostly reports at first). What protocols are used to transfer data between HIPAA compliant applications?
I'm currently trying to work out the best way to build this web application, which will then be intergrated on other systems, such as WinForms, Intranets etc.
We hope to include the usual layers i.e. DAL, BLL, BOL and UI but I have been experimenting with Entity Framework 4 and WCF Data Services and managed to get something in place where I was using WCF as a gateway to EF4.
i.e. Adding a Service Reference to my project and then using the EF4 context and writing LINQ queries against the DB
e.g.[Code]....
Now with the current setup I would still need to write a DAL Class Library, that interacts with the Data Service, because as I said WCF Data Services only seems to be a gateway, I can't see where to put the code (above) in the Data Service and then how I could these methods.
My questions are: 1. How do I develop a WCF Data Service in such a way to allow this behaviour - I know how I could do it using ASMX web service, something like [Code]....
2. If I am to use WCF Data Services, how is serialization handled (if at all) - again I know how to do something in ASMX web services
3. Again, If I am to use WCF, how do I add Security and only allow my applications to access the web service - for obvious reasons
4. Would it be possible / logical to also include the Business Logic Layer into the web service?
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
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.
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.
when person A connects to sql server from their machine and executes a stored procedure (a stored procedure which runs a query and sends an email) - it executes and the email is received.
when person B connects to sql server from their machine and executes the same stored procedure, it executes but the email is never received.
does this mean the stored procedure is executing locally on both users machines?
if not....then why does person B's execution of the stored procedure not generate the email?
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?
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?
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]....
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.