• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

How to write a simple web app in VS 2010.


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?
1 Solution
this should get you started


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!
Bob LearnedCommented:
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.
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


IT should be easy to add missing code for database access.
soozhAuthor Commented:

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.
Bob LearnedCommented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now