473,399 Members | 3,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

How to open a Snapshot file from ASP.NET

I am working on a ASP.NET application using VB.NET.
I have a function that creates a snapshot file on a separate server
and passes a path back to the webpage. Now I want to display the
snapshot. If I cut and paste the path into the browser it opens
snapshot viewer. Exactly what I want. However, if I
response.redirect to the path, I get a error that the file can not be
found. If I response.redirect to "file:"+path It opens the snapshot
in the browser, however you loose most of the controls in shapshot
viewer. You can no longer print or email from the file menu.

Here is the path that gets generated:

\\WPGA030ADOR1\GPRptSrv\TSWPRDSQL\RptOutput\11-18-04
103139_40904a53_29dc_432f_8f33_322e196ef503.snp

When the redirect happens it shows up in the browser as
http://WPGA030ADOR1/GPRptSrv/TSWPRDS...f99219789a.snp
And
file:\\WPGA030ADOR1\GPRptSrv\TSWPRDSQL\RptOutput\1 1-18-04
103139_40904a53_29dc_432f_8f33_322e196ef503.snp
When I cut and paste IE shows a folder icon in the address bar. When
the redirect happens it shows an IE/HTML page icon, when the second
redirect happens it shows a snapshot file icon?

Any ideas on how to redirect to the file as if you where cutting and
pasting??
Nov 18 '05 #1
3 2033
have you tried to output it to Response.OutputStream?
"Steven Thomas" <st******@gapac.com> wrote in message
news:61**************************@posting.google.c om...
I am working on a ASP.NET application using VB.NET.
I have a function that creates a snapshot file on a separate server
and passes a path back to the webpage. Now I want to display the
snapshot. If I cut and paste the path into the browser it opens
snapshot viewer. Exactly what I want. However, if I
response.redirect to the path, I get a error that the file can not be
found. If I response.redirect to "file:"+path It opens the snapshot
in the browser, however you loose most of the controls in shapshot
viewer. You can no longer print or email from the file menu.

Here is the path that gets generated:

\\WPGA030ADOR1\GPRptSrv\TSWPRDSQL\RptOutput\11-18-04
103139_40904a53_29dc_432f_8f33_322e196ef503.snp

When the redirect happens it shows up in the browser as
http://WPGA030ADOR1/GPRptSrv/TSWPRDS...f99219789a.snp
And
file:\\WPGA030ADOR1\GPRptSrv\TSWPRDSQL\RptOutput\1 1-18-04
103139_40904a53_29dc_432f_8f33_322e196ef503.snp
When I cut and paste IE shows a folder icon in the address bar. When
the redirect happens it shows an IE/HTML page icon, when the second
redirect happens it shows a snapshot file icon?

Any ideas on how to redirect to the file as if you where cutting and
pasting??

Nov 18 '05 #2

Thanks, but I am not sure how to do that do you have an example?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
well...
You can make your page generate pretty much any content when you output it
to HttpResponse.OutputStream (you can get there from
Page.Response.OutputStream). I don't have the example right now, but
HttpResponse.OutputStream is of type Stream (see msdn). It means, you can
use write to it the same way you write to your text file.

In practice you would:

1. Open a stream S to your snapshot (don't forget to use Server.MapPath)
2. Copy the content of the S to Response.OutputStream (use the example of
copying files).
3. Close S
4. You're done.
"Steven Thomas" <st******@gapac.com> wrote in message
news:uv**************@TK2MSFTNGP09.phx.gbl...

Thanks, but I am not sure how to do that do you have an example?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4

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

Similar topics

5
by: Bernard Segonnes | last post by:
Hi I'm a bit lost with snapshot creation, so can I have an easy (but with all details : *.ora, user grants, *.sql, db links, ...) example of snapshot between : Server1 : instance : I1...
8
by: Jean-Marc Blaise | last post by:
Dear all, It seems there is a problem with some snapshot table functions, if you try to divide by some element that is unset or equal to 0. This generates a trap file with the db2fmp.exe...
7
by: Pat | last post by:
I would like to send the Print Preview of a MS Access form to a Snapshot file. The form contains an OLE graph. BACKGROUND A snapshot of a report is possible. If I could I would use a report to...
1
by: Wayne Aprato | last post by:
I've just spent about an hour reading posts on exporting reports as snapshots but still can't find a solution to my exact problem. If I am looking at a report in preview mode and want to click a...
5
by: Steven Taylor | last post by:
Hope someone can help. I have an application whereby in order to create one document type I effectively print out 3 or 4 access reports in correct order. So the user goes to the printer,...
1
by: Vincel2k2 | last post by:
Hi, I need to provide Access reports from our web site. When the app gets to the output command I get this error I get this error: The formats that enable you to output data as a Microsoft Excel,...
3
by: Yves Lange | last post by:
Hello, i'm searching a method to take a snapshot and save it in a jpg, bmp or gif file. I tried with win32api and win32con but it save the snapshot to the clipboard, so i tried to redirect this in...
4
by: MPD | last post by:
Hi How can I create a job in sql agent to create a new snapshot every hour? I have, for eg a T-SQL that does it manually. create database Snapshotter_snap_20070418_1821 on ( name =...
8
by: grant | last post by:
Hi I've copied Stephens code into my db, and can get it to work, but only on "plain Jane" reports with no images. Most of my reports has an unbound image obluect in them that I set to an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.