473,473 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Urgent help needed!


I need to send a pdf file generated on the fly using reporting service.
Public users dont have acces to the server hosting reporting service.

My publicly accessible website need to call a page on the reporting servcie
server and send the pdf file back to the client.

I have spent many many days on this now.

Server.exceute does not seem to solve the problem neither.
Any help will be higly appreciated
JJ
Mar 15 '06 #1
17 1049
"jens Jensen" <je**@jensen.dk> wrote in message
news:OK****************@TK2MSFTNGP12.phx.gbl...
I need to send a pdf file generated on the fly using reporting service.
If you need to send a PDF file to someone, do you already know their email
address or will they be typing it into a textbox...?
Public users dont have acces to the server hosting reporting service.
I should hope not, but your web server will need to...
My publicly accessible website need to call a page on the reporting
servcie server and send the pdf file to the client.


Just use the System.Web.Mail class, or System.Net.Mail if you're using
ASP.NET 2

Create a new MailMessage object, provide the from address, to address (the
user), the subject, maybe some body text, then add the PDF as an attachment.
Mar 15 '06 #2
I'm not sending in that send. This is purely http get/http post.
no mail involved.

They just need to open the page
Mar 15 '06 #3
They open a web page on a server . The page request the computeation of a
pdf fil to be sent back to the webclient.
the Response.Redirect does not work as the server that makes pdf is alloweb
to serve public users.

Only the first server can serve phublic users. And sorry, there no email
involved in the process.

Mar 15 '06 #4
Have you tried having your web server make a WebRequest to the backing
server. When the web server has received the WebResponse it can then
pass it on to the client. Watch out for timeouts if it takes time to
generate the reports.

Mar 15 '06 #5
Yes,
This is what i'm cunrrently trying.

The problem is what to do with the stream . How do i send a pdf to the
client based on the stream object i have?
Mar 15 '06 #6
Once you get pdf stream, you can use

Response.BinaryWrite(buffer)

HTH

Elton Wang

"jens Jensen" wrote:
Yes,
This is what i'm cunrrently trying.

The problem is what to do with the stream . How do i send a pdf to the
client based on the stream object i have?

Mar 15 '06 #7
Write the stream to a byte array buffer and then do
Response.BinaryWrite. Make sure you set the headers to the appropriate
values for pdf files.

Mar 15 '06 #8
How do i compute the byte parameter from sr?
sr beeing:
System.IO.StreamReader sr = new
System.IO.StreamReader(resp.GetResponseStream());?


Mar 15 '06 #9
byte[] buffer = new byte[sr.Length];
sr.Read(buffer, 0, buffer.Length);
Response.BinaryWrite(buffer);

Mar 15 '06 #10
It seems like the pdf is being corrupted in the process.
PDF reader reports an error.
Mar 15 '06 #11
I have verified that reporting service correctly generates the pdf file.
I can view it in a web page on our network.

Mar 15 '06 #12
There are many good reasons that streams get corrupted. However it's
difficult to debug when I can't see the stream or the code. Try
checking the different stages of the transfer and see where the stream
changes and then you will most likely also find what it is that causes
the error. My guess would be that you are not reading stream from
beginning.

Mar 15 '06 #13
If you are willing to let me have a look at the code then drop me a
direct message.

Mar 15 '06 #14
Well ,
I wiil post the code here time to extract the necessary bits.
Mar 15 '06 #15

The only working pdf we have is a link provided by reporting service.
We can open the link using pdf and see that reporting service got something
working.
How to use this link in our web application and show is to the visitor who
for security reasons
cannot directly view the link.

We dont have a working code.
We only have the reporting service link.
Mar 16 '06 #16
Siden du nu også bruger dk som domæne antager jeg at jeg kan skrive
på dansk.

Så vidt jeg kan forstå så er dit problem at du ikke kan få den fil
som reporting service genererer overført til klienten.

Hvis du prøver at følge datastrømmen så vil du sandsynligvis se
hvor det er at der sker en korruption. Prøv at læs filen til
webserveren først for at se at serveren rent faktisk læser den
rigtigt. Det er mit gæt at det er måden webserveren læser filen på
der genererer fejlen.

Hvis webserveren rent faktisk kan læse filen og vise den, så kan
problemet være at kommunikationen til klienten skaber en fejl. Det er
i så fald lidt mere kompliceret.

Som jeg tidligere har sagt, så er det svært at gætte sig frem til
fejlen hvis jeg ikke kan se koden som læser pdf filen.

Hvis du stadig har behov for hjælp så send mig en direkte mail.
Jacob

Mar 17 '06 #17
Thanks to your help, the problem have now been solve.
The problem was header encoding issue.
It now set to 1250 and that solved that problem
Many thanks
JJ
Mar 17 '06 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Random | last post by:
The way I've built my page is to take the user through a multi-form process, only rendering those controls that are needed for each section. The ViewState is working the way I want it to,...
4
by: XML newbie: Urgent pls help! | last post by:
I am using VB.Net. My program is to connect to a remote IPAddress. Once, it verifies the login information it should display the SessionID and enable some button . I appreciate your help and thanku...
55
by: Steven Nagy | last post by:
Hi all, Sorry I have no time to test this myself.... Can I add the same attribute to a field twice? Eg. Public string myField;
7
by: meenasamy | last post by:
Hi all, i need to create a function that takes three parameters( Original currency, needed currency, amount) i need to convert from the original currency to the needed currency the amount and...
3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
2
by: Preetam Pattanashetty | last post by:
Hi I am learning ASP.NET using C#. I am able to run .aspx files on local system, but when I load them to the server, I get the "Server Error in '/' Application" error. I have tried to configure the...
0
by: Christopher | last post by:
Urgent Help Needed: The EPVH-1.1 Visual Hull Library. Dear All, I am a student doing research in computer vision. The EPVH-1.1 Visual Hull Library will really help a lot in my research. I...
2
by: dragonball | last post by:
hi, i want to use log(double) in my java prog. so i have imported java.lang.Math flanagan.math.PsRandom now i wanna use log function in a private method inside a class. so i try : ...
2
by: rKrishna2k6 | last post by:
We used to run our application on framework 1.1 and upgraded to 3.5 recently(I understood 2.0 and 3.5 are same except for the few add In s) Our Prod environment is on Win 2003 & IIS 6.0 and...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.