473,398 Members | 2,120 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,398 software developers and data experts.

ASHX file and xml extension

Hello,

I have a java applet that builds a graph using an xml file. I can create
the xml with the ashx file, however, the applet doesn't recognize the
extension. What I am doing now is streaming the data to text file, which I
don't prefer since I am creating files on the server. Is there a way to
generate the ashx file using an xml extension or something of this nature?
Any suggestions would be appreciated.

Thanks, sck10
Dec 20 '06 #1
2 2331
Hello Steve,

As for the XML file extension issue, I think there are two things we can
check:

1. Whether the java applet always force the XML content url to be end with
a ".xml" extension, if this is the case, I'm afraid you have to provide
such a xml file(with .xml extension)

2. If the applet does not require that you must provide a fixed ".xml"
extension for the xml stream, then you should check the code you
programmatically streaming out the content. A simple code snippet that
render out XML content is like below:

=========================
protected void Button1_Click(object sender, EventArgs e)
{
Response.ClearHeaders();
Response.ClearContent();

Response.ContentType = "text/xml";
Response.Write(
@"<root>
<items>
<item id='1'/>
<item id='2'/>
</items>
</root>
");

Response.End();
}
=========================

Please feel free to let me know if there is anything I missed or anything
you unclear.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

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


Dec 21 '06 #2
Thanks Steven,

Appreciate the help...

sck10
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:nq**************@TK2MSFTNGHUB02.phx.gbl...
Hello Steve,

As for the XML file extension issue, I think there are two things we can
check:

1. Whether the java applet always force the XML content url to be end with
a ".xml" extension, if this is the case, I'm afraid you have to provide
such a xml file(with .xml extension)

2. If the applet does not require that you must provide a fixed ".xml"
extension for the xml stream, then you should check the code you
programmatically streaming out the content. A simple code snippet that
render out XML content is like below:

=========================
protected void Button1_Click(object sender, EventArgs e)
{
Response.ClearHeaders();
Response.ClearContent();

Response.ContentType = "text/xml";
Response.Write(
@"<root>
<items>
<item id='1'/>
<item id='2'/>
</items>
</root>
");

Response.End();
}
=========================

Please feel free to let me know if there is anything I missed or anything
you unclear.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

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


Dec 21 '06 #3

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

Similar topics

0
by: JJ | last post by:
I am trying to use .ashx files to handle dynamic image requests. The aspx page needs to pass the data to the ashx file. It was decided to not use the query string. Instead we hoped we could use the...
2
by: Roshawn Dawson | last post by:
Hi, While browsing the web, I came across a file extension in ASP.NET called ..ashx. Does anyone know what this file type is for? Is it useful? How do you use it? Thanks, Roshawn
5
by: Roshawn Dawson | last post by:
Hi, Has anybody created an entire asp.net app using only ashx files? I know that they are simply handlers used by the asp.net worker process. I hear that they are in some respects better than...
6
by: Philipp Schmid [MSFT] | last post by:
I am trying to add a Generic Handler (ASHX) to my web site solution. In order to do that I have to specifiy an assembly name in the web.config file. But since 2.0 web sites are no longer...
0
by: Jason Chan | last post by:
I wanna to create ashx file to generate image on the fly. In VS Add New Item dialog, I cannot find the ashx template. So what I do is create a text file and rename it to .ashx However I cannot...
3
by: Tim | last post by:
Guys I am trying to create an ashx IHttpHandler that will provide images for me. This is what I have done so far. ' Start test.ashx <%@ WebHandler Language="VB" Class="testashx" %>
0
by: batham | last post by:
Does anyone know why I cannot use the #region/#endregion to specify a block of code in my VS 2005 IDE ASHX Handler? Is there a place where I need to put this extension (ASHX) so it supports the...
2
by: Max2006 | last post by:
Hi, After I right-click on my web application project file and choose "Publish ." and do the publishing, the result publishable files does not include the *.ashx files. Is it by design? How...
7
by: =?Utf-8?B?QU9UWCBTYW4gQW50b25pbw==?= | last post by:
Hi, I have been using the code (some of it has been removed for simplicity) below to allow authenticated (using ASP.NET membership database) users to get a file from their archive area. It...
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:
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
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.