Architecture Switch From Page And JSON ASMX Web Services To MVC
Feb 6, 2010
there's an .aspx page that does absolutely nothing in the codebehind, but contains the markup for the page in the Design View. Then we have an .asmx web service that receives requests with JSON content-type. These are called by the JavaScript in the page. This web service returns .NET objects serialized to JSON in response to these JavaScript Ajax HTTP POSTs. I'd like to switch to MVC but am not sure to how switch this architecture. Basically what we're doing is two things:
1) Replying to GET /MyPage.aspx with HTML markup that represents the page
2) Replying to POST /MyPage.aspx/WebMethodName requests with .NET objects serialized to JSON.
It seems like MVC would be a good way to eliminate the need for a Page object (again, the codebehind isn't used--only the HTML markup in the .aspx file is) and an .asmx web service. No? What do I need to start changing to accomplish this switch? Is it straight-forward? Painful? Someone at work already has an MVC page running in the same directory as my Web Forms .aspx and .asmx web service, but I don't see anything in the directory about Routes, so I'm confused. He's got a Views, ViewModels, and Controllers subdirectories.
View 3 Replies
Similar Messages:
Oct 5, 2010
how to implement web services in a 3 tier architecture and also give a brief idea about how to implement coding as soon as possible.
View 1 Replies
Sep 7, 2010
a while ago I came across a way to hide the summary page of Web Services. I think it's an attribute that I can set for the entire web service interface, but I couldn't find it anymore. Does anyone know how it's done?
For example, if I implemented a web service interface at using foobar.asmx, if I access foobar.asmx directly, I will see a summary page that tells me about all the webmethods available, etc. How do I prevent that page from being displayed?
View 3 Replies
Aug 31, 2010
i need to be able to expose information to a page, and I need to write the information in xml on my webserver which will be dynamically created from the database.
I need to use json to pass the data from the screen back to the server two way communication xms back and forth. Is it actually any good using a wcf endpoint to serve the json back to the page and use query with wcf? Is this possible?
Or is it easier to use standard pages .aspx and just do a call to a url and get the json with jquery....
We will probably want to send this information to other locations at some point in the future too....
View 1 Replies
Oct 26, 2010
Is there any design pattern or architectural design that prevent the following type of code, where I have an enum with different fileformats and I have to make a switch anywhere I want to distinguish between the different fileformats?
[Code]....
If add an item to the enum definition in this case I have to change all the code that uses switches and that kind og enum which, I guess, is a bad approach in terms on maintenance of the application?
View 1 Replies
Aug 13, 2010
I have a wcf service which is running on IIS7 using WsHttpBinding but further requirement I need to create another end point using NetTCPBinding.And I want to host my wcf service like if my client application in intranet it will use NetTcpBinding or if it is in internet then it will use WSHttpBinding.
View 3 Replies
Aug 19, 2010
was giving a though on using ajax enabled wcf services as part of architecturegenerally wht im usingis UI-> BL-> data accessis it suggestable to use wcf services layer insteadof BLnd hv UI-> services-> data accessrelated to asp.netwould like to no pro's and con's of doing this thing.
View 2 Replies
May 24, 2010
Microsoft Ajax can expose webservices which respond with json or xml depending on configuration. I would like to mock these services using soap ui. Using the wsdl I can do this to mock the services in the case where xml is returned, however how can I mock the response when JSON is returned?
View 1 Replies
Jul 2, 2010
want to use Web Services in a project. I have basic concept of web services but couldn't understand some of its fundamentals.
1. what is SOAP, Rest and JSON ?
2. WCF Services are SOAP based or Rest or JSON based ?
3. Are Ado.net data services different from WCF ?
4. Which Web Services are easy to consume on client side ?
View 1 Replies
May 25, 2010
We are developing SOA based application using .NET 3.5 and WCF & WPF.
One common issue we are facing is mapping between WCF enum and WPF enums. We had to do mapping between WCF enums to WPF enums. Following is sample code
Switch(WCFServiceObject.Status)
{
Case WCFServiceStatus.Married[code]....
You can see that we have to do mapping WPF and WCF enums. Is there any easiest way to achieve this mapping without writing tedious switch statements? One way of doing this is using Dictionary, but apart from this, is there any good way? We have lots of enums for which have to do mappings.
View 1 Replies
Jul 25, 2010
I have 2 web services. They are identical in every respect except that one points to a test schema and the other one to production. I'm in the middle of writing the class that will use these web services but I'm not sure how to do what i'm trying to do.What I need is a class that does the work of consuming the web serivce, and I want to pass to it either the test or prod serice and and it be transparent insde of the class.
So..testSerive and prodSerice are idential, how can i have them inherit from something so that i can pass that something to my consumer class?
View 2 Replies
Sep 10, 2010
Suppose we are building a web-based application to retrieve and enter information into a database. The user-interface invokes web services. Which architecture would use for the application.
View 10 Replies
Jun 16, 2010
Can some one inform me whether I need to replicate the same set of entities in the client which are similar to that of the ones in the server? I have planned to start a proj with service functions as wcf services and in turn they are getting referred in silverlight client application.
Incase if i need to consider casting to or back from the return value lists of service methods in the server, should i be creating entity class in the client application as well? Or is there a work around? Something like exposing the entities from the server just as the services functions?
View 1 Replies
Feb 23, 2011
My requirement is i need to display some quotes from some vendors in my User Interface. Some of the quote details will be fetched from database where as some vendors are giving web services to get the quote results. I need to combine the quotes from database as well as the various web service response and display in the grid.
View 1 Replies
Dec 29, 2010
I have a text file named gisQuery129.json that is created using Json.NET - [URL] There is an example on how to create a JSON file and I have done that successfully, but I want to read the file on a page load event and add the values to .NET textbox controls for input values in a query. The created file looks like the following:
{
"myData": {
"randomNumber": "129",
"Application": "MyMapApp",
"FeatureId": "ALL",
"Feature": "ALL",
"spatialQuery": "FEATURE_ID= '11111' AND REQ_SEQ_NUM= 1 AND RAND_PARAM= 129 OR FEATURE_ID= '22222' AND REQ_SEQ_NUM= 2 AND RAND_PARAM= 129"
}
}
I want to read the data in the above sample JSON data and then populate my textboxes something like this:
txtRandParam.text = "129"
txtApplication.text = "MyMapApp" and three more text boxes after that.
View 4 Replies
Apr 1, 2010
I'm planning to make an ASP.NET webserver that provides all kinds of functions, like an API. There will be quite alot functions that can easily be grouped (datasystem, userAccount, fileSystem, and so on). I can make multiple services (asmx files) into a single webserver, and let the clients connect to whatever service(s) they need. However, I'm not sure if it's a wise thing to do... Pack everything into 1 big service(1 asmx file), or split up into many smaller services? How about:
- performance/memory on the server (a client that connets with 1 or 6 services)
- Maximum connections (we will use a Windows XP Server edition computer)
There will be about ~30 computers using it. In a worst case scenario, they each computer could make use of 6 services at the same time, if I decide to split it up. A single client could make use of the fileSystem, account, dataSystem and several other things at the same time.
View 6 Replies
May 7, 2010
Actually i dont know whther this is the correct forum or not? but i didnt found any other section to post a question like this.Actually i am in . I need to document the service i developed so when my absence or something the other developer can understand my way and code.The aim is to specify the module descriptions, needs and business logic i used to implement. So the next developer can understandCan anyone tell me the name of this document. Developer Document ? Please tell the correct name of this and any link to download any template to undertand. Please dont take it as simple question
View 2 Replies
Jul 17, 2010
i want to know, how to use the web services in asp.net project
View 2 Replies
Jul 28, 2010
I need a book or two to get a good understanding of web services, starting from very basics, and going upto WCF. I've been using c# for 2 years and have intermediate level of experience with the language.
View 1 Replies
Sep 21, 2010
Using ASP.NET 3.5 /C# / VS 2008.
I have written some web services that I want to make available to others by subscription. The subscribers need to use the service from a specific domain / IP address and also authenticate with a user Id and password.
What exactly should I distribute to the subscriber so they can use the services, while exposing the least about my code?How can authenticate a consumer of services without always passing an Id / password for each service?
View 3 Replies
Feb 8, 2011
I learned from internet that webservices can be invoked only by HTTP whereas WCF can be invoked by HTTP,TCP,et., can i know the difference between them
View 4 Replies
Aug 6, 2010
These days I see that every other job posting requires LINQ and WCF. I have spent lot of time on LINQ, was fun to learn.
Now I want to move on to Web Services and WCF. After goggleing for some time, I am not sure either go for web services or WCF.
View 2 Replies
Mar 2, 2011
I've created Web Services in .Net 3.5 & Consumed those Web Services in a Client Web Application. Now i want to Host the WebService in IIS 5.1. I'm very new to .net, I'm using VS 2010, Wndows XP Service Pack 3, IIS 5.1;
View 15 Replies
May 5, 2010
I have a wcf dataservice that talks to a silverlight client and a wcf service library that talks to a chat client.How can i get the two services to talk to each other?
View 3 Replies
Mar 18, 2011
From my following code snippet:
ExchangeServiceBinding binding = new ExchangeServiceBinding();
binding.Credentials = new NetworkCredential(username, password);
binding.Url = "http://servername/ews/exchange.asmx";
The above web services throws Unauthorized Access Error (Error : 401) for newly created users.I would like to know how to impersonate this user for accessing this exchange web services.
View 1 Replies