VS.NET 2008: controls that involve images render as red X in design time, how to fix?

  • Thread starter Thread starter Ken Fine
  • Start date Start date
K

Ken Fine

I've been living with a frustrating issue with VS.NET for some months now
and I need to figure out what the problem is. Hopefully someone has run into
the same issue and can suggest a fix. I suspect some permissions problem.

I'm running VS.NET 2008 in Vista. Symptoms and observations:

* ASP.NET's native ImageMap and Image controls work just fine and provide a
design-time preview of images that are referenced via the ImageUrl property
* Telerik's controls work just fine. This includes their older stuff as well
as the more recent ASP.NET AJAX releases that bind all of the controls and
their assets into one assembly.
* Other VS.NET/ASP.NET controls that involve design-time display of images
do NOT work fine in terms of providing the design-time image preview when
referenced with anything besides an explicit path (e.g. ~/image.jpg as
ImageUrl does not work.) . I get a red X instead. If I view the page on
localhost or in deployment, the control works just fine. What's broken is
the design-time preview of the image. This is problematic for controls that
involve interaction with the image, e.g. this imagemap control with
graphical designer: http://www.ewoodruff.us/EWSImageMaps.aspx
* Reinforcing something from the last point, writing in an explicit path
will force design-time image preview to work, e.g.: putting
C:\Users\Me\Documents\Visual Studio
2008\Projects\KILLTHIS\KILLTHIS\image.jpg as the ImageUrl will cause the
control to work properly.
* As a test I created a new Web project. The controls exhibited the same
design-time error. The problem isn't limited to one website.
* I tried enabling Full Control permissions for Users, Everyone, and Network
Service on both the Projects folders and the Website folders. This did not
resolve the problem.

Any suggestions for where else I should be looking on this? Thanks much for
your help.

-KF
 
Hi KF,

From your description, you're encountering some problem with display the
image(referneced in ASP.NET control) at design-time. As for the built-in
ASP.NET Image/ImageMap controls, they just simply render the plain html in
the design-time designer. For those controls that you find not work correct
at design-time, are they custom webserver controls you created or some
other built-in controls or 3rd party controls? If they're not built-in
controls or not what you created, you can use reflector to inspect their
rendering code or its designer class(if that control has applied one) to
see what's its design-time displaying logic. BTW, would you please give me
some example page markup for met to test locally?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
 
Thanks Steven. This issue is serious enough for my work that if you think I
should initiate a MSDN support incident I will do that. I have a piece of
information that may help us reach resolution: the application may be
confused about where its root is, but I do not know how to fix that. Please
read on.

These are all third party controls. They include:
http://www.ewoodruff.us/EWSImageMaps.aspx
http://www.amarantin.se/
http://www.neodynamic.com/Products/IDWebC/ImageDrawWebControl.aspx?tabid=24&prodid=4

I did not have these problems in VS.NET 2005.

My background isn't in computer science so while I understand what you mean
by using reflection to inspect the controls' output, I have no idea how to
do that. I am using C#.

Now for the nugget of information that may help us.

I made a document called test.aspx and placed it in a subfolder of my app
called /test. The following three declarations of the controls did not show
up in design time, but they did render when previewed:
<EWSI:ImageMap ID="ImageMap1" runat="server"
ImageUrl="/whatever.jpg" />
<neoimg:ImageDraw ID="ImageDraw1" runat="server"
CacheExpiresAtDateTime="">
<Elements>
<neoimg:PolygonShapeElement Font-Name="50's Yesterdings JL"
Font-Size="8"
Height="65" Name="766BBA45A5A146D9B6D0018DBAD6DB32"
Sides="6"
StrokeFill-BackgroundColor="Black"
TextPadding-Bottom="0" TextPadding-Left="0"
TextPadding-Right="0" TextPadding-Top="0" Width="67">
</neoimg:PolygonShapeElement>
</Elements>
<Canvas Fill-BackgroundColor="255, 255, 255"
Fill-ForegroundColor="0, 0, 0"
Fill-GradientColor1="255, 255, 255" Fill-GradientColor2="0,
0, 0" Height="65"
Width="67" />
</neoimg:ImageDraw>
<WebPack2:ImageText ID="ImageText1" Runat="server" Text="ImageText">
</WebPack2:ImageText>

Consider the first item, an enhanced ImageMap control. It exhibited the
following behaviors:
* When the ImageUrl was described as /whatever.jpg, it did NOT show in
design time but did show when viewed in the browser
* When the ImageUrl was described as ~/whatever.jpg, it did NOT show in
design time OR when viewed in the browser
* When the ImageUrl was described as ../whatever.jpg, it DID show in design
time and DID render in the browser

The application is located in
C:\Users\My Name\Documents\Visual Studio 2008\WebSites\MyWebSite

I think this may be the clue we need. It seems the controls don't understand
where the root of the application is. Can you suggest what I should be
looking at?

Thanks for all your help, Steven.
 
Thanks for your reply KF,

For "reflector" tool, it is a utility (written by a MSFT engineer) which
can help inspect disassembly code of most .NET assemblies. In case you
have interests , you can download it and try using it, it's quite useful on
troubleshooting based on my experience.

http://www.aisto.com/roeder/dotnet/

For your scenario, I've got it much clearer now. Actually the image
displaying problem(at design-time) occurs over those enhanced image
controls from a 3rd party control package. Also, as you mentioned that the
following path:

~/...
/.....

not work and

../ path works,


I think it is definitely an control implementation problem. Though I
haven't checked the source code of those 3rd party controls, I think that
those controls doesn't provided much support for design-time image path
resolution.

Currently, my suggestion is that if possible, you should first contract the
3rd party control's vendor to see whether they have any update or quick fix
on such issues. And even if you submit this problem to Microsoft CSS, it
is likely that they'll inspect the control source and narrow down the
problelm to the control's implementation. It will also require you to
contact the control vendor for the direct fix.

If you have anything unclear or any other questions on this, please feel
free to let me know.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
 
Hi KF,

Any progress on this issue? Or is there still anything I can help?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: (e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: (e-mail address removed) (Steven Cheng [MSFT])
Organization: Microsoft
Date: Fri, 08 Aug 2008 02:55:45 GMT
Subject: Re: VS.NET 2008: controls that involve images render as red X in
design time, how to fix?
 
Back
Top