Serving Dynamic web pages in a .NET web service
-
Monday, April 23, 2012 2:01 PM
I hope I have the right forum category here. Let me start out by trying explain what I am doing.
I have a service that accepts data from a user such as a person's name, address, etc. I have another project that is a .NET web page which in the code behind talks to a local database to retrieve this information from a DB that was sent to the web service. Currently when a request is sent I will make a physical copy of the web page and store it in some hashed directory path on my web serer and then send this path back to the user so they can in turn visit this site and see their customized data on the web page.
My question:
Is this the best of way of serving up a dynamic web page? I like this method because it allows me to send a customized URL to a user, however I dislike it because now I can potentially have a couple thousand copies of the same page on my web server.
Is there a way to generate a dynamic url, for example: http://www.mydomain.com/feedback/4738492/@492!sdl/form.html but have it point to the same form?
Can anyone offer their experience in the best way to handle this problem as well as the reasoning behind your thoughts.
Thank you!
All Replies
-
Monday, April 23, 2012 7:43 PMModeratorThis is really more of an ASP.NET question than a web service question. Please ask such questions at http://forums.asp.net.
John Saunders
WCF is Web Services. They are not two separate things.
Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
Use File->New Project to create Web Service Projects -
Tuesday, April 24, 2012 9:43 AM
Storing a view layer to hard disk for each individual is never been a good approach it will always increase load on server and increase unnecessary file.
You can choose a different approach here, from your web service you get the response design the ui part (view part uisng the data model extracted from db).
Now on the UI add the generated Ui content to container div or something using javascript/ jquery.
Or may be you should try using MVC3/4.
Best Regards Sanjay Pant [Metadesign Solutions]
-
Wednesday, April 25, 2012 9:41 PM
Hi Sanjay,
Thank you for the suggestions. It makes sense that I would not want to load down the server in the way I proposed. I have never heard of MVC and started looking into it. It looks to be a powerful framework and I still do not completely understand all of its power. Do you know of any links you can direct me to that might be a good starting point for researching what I am trying to accomplish?
Thank you!
-
Thursday, April 26, 2012 3:46 AM
here is link with all the samples and video.
http://www.asp.net/mvc/tutorials
Best Regards Sanjay Pant [Metadesign Solutions]
- Proposed As Answer by Sanjay Pant Tuesday, August 21, 2012 7:07 AM

