 |
 | Failure vferrava | 12:09 29 Jul '08 |
|
 |
While this works fine in Visual Studio, when I turn it over to my IIS server, I get the classic white box with the red X instead of the image. The properties shows the address as: http:\\myIISserver\ 1.jpg?idimg=1 file but the Type is Not Available and the immage does not display. The win.config has been updated. What am I missing?
|
|
|
|
 |
|
 |
With me hapens the same in VS this works fine but in my IIS the image don't open
What Can i do to solve this problem?
|
|
|
|
 |
|
 |
In IIS, you will have to associate the .jpg extension with the aspnet_isapi.dll (copy from .aspx extension).
|
|
|
|
 |
 | Alternative VitalyTomilov | 11:51 5 Jul '08 |
|
 |
I used a different method a while back, using XSL embedded objects.
Simply use XSL document with method reference/query that pulls out the pictures from the database, so they get automatically inserted into the resulting document during transformation.
|
|
|
|
 |
|
 |
I guess it can be done that way too, but I prefer to use the results from the SQL Datasource directly without any processing.
|
|
|
|
 |
|
 |
Vitaly,
Can you show us an example of this? ...or post a link to an Example?
Thanks in advance.
|
|
|
|
 |
|
 |
It was the code i did 3 years ago, don't have it anymore, but the idea was simple...
You have an ASP.NET project, plus a database that stores pictures
First, you design a simple class (consider C#) that has one method: Picture GetMyPicture(record ID), that returns a picture object from the database usig the recrd ID.
Now, you have an XSLT file with Microsoft extensions in it, which means: 1. In the header of XSLT you specify a reference to your C# class 2. Where you normally have tags for data transformation, you use reference to the method with current ID parameter.
Since it is a picture object, the piece in your XSLT would look like <img src="meta-reference-to the method" ...="">
Then you pull pull data from the database as XML, and execute the transformation. That's all.
Here's one example: http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=64
There are plenty others you can find.
modified on Sunday, July 6, 2008 5:02 PM </img>
|
|
|
|
 |
|
 |
This is exactly what I was trying to avoid, writing classes and customizing code for each database. Why do this when you can simply bind the control to a data source and the control does the rest? I generally try to avoid scratching my left ear with my right hand .
|
|
|
|
 |
|
 |
Note, i did not call it a better alternative 
And besides, i did it 3 years ago. Things change..
|
|
|
|
 |