Solved

How to write a simple web app in VS 2010.

Posted on 2012-04-05
5
349 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 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Question! 4 36
in Dot net,lastest version of MVC 3 24
PrintingFoundIt(Almost!(Damn!)) 1 27
Get number of Files in Directory and Sub Directories 2 42
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
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…

803 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