Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to write a simple web app in VS 2010.

Posted on 2012-04-05
5
Medium Priority
?
367 Views
Last Modified: 2012-04-16
Hello,

I am a beginner with C# and visual studio 2010.

I want to write a web application that handles a http request, looks in the query fields for a document id, loads the relevent document from a database as a PDF, and return the PDF in the HTTP Response.

Quite simple, and i already have an example running in Delphi as an ISAPI dll.

What coding template do i use in VS 2012?
0
Comment
Question by:soozh
5 Comments
 
LVL 21

Accepted Solution

by:
masterpass earned 2000 total points
ID: 37814368
this should get you started

http://www.mikesdotnetting.com/Article/80/Create-PDFs-in-ASP.NET-getting-started-with-iTextSharp

The point is that when you want to make good PDF's you should rely on third party tools. Another tool to be looked at is activePDF

for getting started in asp.net application, you should be looking as MSDN! an example simple application is here : http://www.kirupa.com/net/helloWorld.htm

hope this helps!
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 37815405
It sounds more like you already have a PDF document in a BLOB field, so you wouldn't need iTextSharp.  As far as template goes, it would be my suggestion to use File > New > Project > Visual C# > Web > ASP.NET Empty Web Application.
0
 
LVL 22

Expert Comment

by:ambience
ID: 37815589
The fact that you had an ISAPI dll earlier makes me want to suggest that you also look into the options of not having a web-app but a Webservice for that purpose. The idea is explained here

http://www.dotnetcurry.com/ShowArticle.aspx?ID=723

IT should be easy to add missing code for database access.
0
 

Author Comment

by:soozh
ID: 37815811
Hello,

Thanks for the comments...

Yes i already have the PDF so i dont need to generate that.

What i am looking at is returning the PDF in the HTTP response.  Can a web service do this?

And can i pass login credentials in the content fields?  The whole thing will run under https.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 37815816
A web service could return the PDF as a byte array, and the caller could use that byte array to recreate the PDF in whatever manner was required.

A web site could return the PDF in the HTTP response.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question