473,657 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The XML file cannot be displayed error

Hi all,

I'm trying to fill a PDF form with asp.net using the FDF Toolkit.
I have a simple form with a textbox and a button. When the button is
clicked, the pdf should open with the field filled from the textbox.

When I open the page in IE (whatever version) i get :
############### ############### ############### ###############
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then
click the Refresh button, or try again later.

----------------------------------------------------------------------------
----

An invalid character was found in text content. Error processing resource
'http://sher-mail-temp/e-swita/trythis.aspx'. Li...
############### ############### ############### ###############

Here is the trythis.aspx code

<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="try this.aspx.vb"
Inherits="e_swi ta.trythis"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>trythi s</title>
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING= "FlowLayout ">
<form id="Form1" method="post" runat="server">
<P>
<asp:TextBox id="TextBox1" runat="server"> </asp:TextBox>
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button></P>
<P>&nbsp;</P>
</form>
</body>
</HTML>

and the codebehind trythis.aspx.vb :

Public Class trythis
Inherits System.Web.UI.P age

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()

End Sub
Protected WithEvents TextBox1 As System.Web.UI.W ebControls.Text Box
Protected WithEvents Button1 As System.Web.UI.W ebControls.Butt on

'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceho lderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeCompo nent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
End Sub

Private Sub Button1_Click(B yVal sender As Object, ByVal e As
System.EventArg s) Handles Button1.Click
'Put user code to initialize the page here
Dim FdfAcX As FDFACXLib.FdfAp p
FdfAcX = New FDFACXLib.FdfAp p
Dim outputFDF = FdfAcX.FDFCreat e()
outputFDF.FDFSe tFile("http://sher-mail-temp/e-swita/test2.pdf")

outputFDF.FDFSe tValue("testfie ld", "test", False)

HttpContext.Cur rent.Response.C lear()
HttpContext.Cur rent.Response.C learContent()
HttpContext.Cur rent.Response.C learHeaders()
HttpContext.Cur rent.Response.C ontentType = "applicatio n/vnd.fdf"
HttpContext.Cur rent.Response.B inaryWrite(outp utFDF.FDFSaveTo Buf)

outputFDF.FDFCl ose()

End Sub
End Class
Now what I tried is delete all the HTML except the <%@ Page Language="vb"
.....%> in trythis.aspx and guess what, there's the pdf file.
This proves that my MIME settings are ok, right?

So, is this a bug in the .Net framework ?

Anybody has an idea how this can be solved ?

Many thanks in advance,
Eric
Nov 18 '05 #1
1 2280
Hi, Eric,

Just call Response.End() at the end of the Button1_Click method. See inline

Greetings
Martin
"ericvdb" <er********@hot mail.com> wrote in message
news:OV******** ******@TK2MSFTN GP12.phx.gbl...
Hi all,

I'm trying to fill a PDF form with asp.net using the FDF Toolkit.
I have a simple form with a textbox and a button. When the button is
clicked, the pdf should open with the field filled from the textbox.

When I open the page in IE (whatever version) i get :
############### ############### ############### ###############
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then
click the Refresh button, or try again later.

-------------------------------------------------------------------------- -- ----

An invalid character was found in text content. Error processing resource
'http://sher-mail-temp/e-swita/trythis.aspx'. Li...
############### ############### ############### ###############

Here is the trythis.aspx code

<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="try this.aspx.vb" Inherits="e_swi ta.trythis"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>trythi s</title>
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING= "FlowLayout ">
<form id="Form1" method="post" runat="server">
<P>
<asp:TextBox id="TextBox1" runat="server"> </asp:TextBox>
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button></P> <P>&nbsp;</P>
</form>
</body>
</HTML>

and the codebehind trythis.aspx.vb :

Public Class trythis
Inherits System.Web.UI.P age

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()

End Sub
Protected WithEvents TextBox1 As System.Web.UI.W ebControls.Text Box
Protected WithEvents Button1 As System.Web.UI.W ebControls.Butt on

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceho lderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeCompo nent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
End Sub

Private Sub Button1_Click(B yVal sender As Object, ByVal e As
System.EventArg s) Handles Button1.Click
'Put user code to initialize the page here
Dim FdfAcX As FDFACXLib.FdfAp p
FdfAcX = New FDFACXLib.FdfAp p
Dim outputFDF = FdfAcX.FDFCreat e()
outputFDF.FDFSe tFile("http://sher-mail-temp/e-swita/test2.pdf")

outputFDF.FDFSe tValue("testfie ld", "test", False)

HttpContext.Cur rent.Response.C lear()
HttpContext.Cur rent.Response.C learContent()
HttpContext.Cur rent.Response.C learHeaders()
HttpContext.Cur rent.Response.C ontentType = "applicatio n/vnd.fdf"
HttpContext.Cur rent.Response.B inaryWrite(outp utFDF.FDFSaveTo Buf)

outputFDF.FDFCl ose()
Response.End()

End Sub
End Class
Now what I tried is delete all the HTML except the <%@ Page Language="vb"
....%> in trythis.aspx and guess what, there's the pdf file.
This proves that my MIME settings are ok, right?

So, is this a bug in the .Net framework ?

Anybody has an idea how this can be solved ?

Many thanks in advance,
Eric


Nov 18 '05 #2

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

Similar topics

5
6001
by: Bob | last post by:
I am displaying a form with a datagrid populated from a select of database records which now exceed 12,000 when I select them all. The form displays just fine with all 12,000+ entries but when I leave the form to go back to the originating screen, I get a "The page cannot be displayed" screen for "Cannot find server or DNS Error" "Internet Explorer". You know the page - it starts with "The page you are looking for is currently...
1
2585
by: Bob | last post by:
I am displaying a form with a datagrid populated from a select of database records which now exceed 12,000 when I select them all. The form displays just fine with all 12,000+ entries but when I leave the form to go back to the originating program, I get a "The page cannot be displayed" screen for "Cannot find server or DNS error" "Internet Explorer". But when I select a lesser number of records - under 12,000 (don't think there is...
7
4531
by: Joe | last post by:
I have an upload file operation in the web application. UploadForm.asp is the form, and UploadAction.asp is the form processing. //UploadForm.asp <FORM NAME="InputForm" ACTION="UploadAction.asp" METHOD="POST" enctype=multipart/form-data> <input type="file" name="fileName"> //etc ... </FORM>
2
2006
by: news.bellatlantic.net | last post by:
I created a for with file inputs (<input type=file.../>) I named them file1, file2, file3 etc. How do I access them in the code behind without actually calling each one by name (there are 21 of them). This is what I have so far. Strangely I get a error some of the time, I have not isolated it because I can't get it to go to debug. The code below kind of works about every 3rd one gives me an error and I can't get it to go to debug! I get...
2
1846
by: Tim::.. | last post by:
Can someone please tell me why I keep getting an error saying the page cannot be displayed in my ASP.NET app. If I upload a file that is under approx 3mb then it works file but as soon as I try to upload a larger file I get Page Cannot be displayed error... I'm uploading the file as binary into and SQL 2000 Database! Any advice would be appritiated!
2
8137
by: Tim Reynolds | last post by:
Team, When my web service throws an exception and I am debugging on my PC - I get the exception back in my browser fine. My web.config shows <customErrors mode="Off"/> and this is working well. However, when I test this web service on the deployment server, I only get 'The page cannot be displayed' instead of the exception. That is when I call the web service on the deployment server locally or remotely. The web.config on the...
5
12291
by: Neil Rossi | last post by:
I have an issue with a particular ASP page on two web servers. Let's call these servers Dev1 and Beta1. Both Servers are running IIS 5, Windows 2000 SP4 with "almost" all of the latest patches. On Beta1, I am able to execute a particular page with no problem, that page opens up in the comes up just fine. On Win2kdev1, when I go to execute the same page, it opens a file download dialog and asks me whether I want to open or save the...
1
6476
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located at /usr/local/lib/php/php.ini. Any ideas why the setting does not seem to be having an effect? ...
7
1902
by: rn5a | last post by:
I am giving users the option to upload files from their hard disk to the server but only those files will be uploaded whose size is less tha or equal to 1 MB. I am using the ASP.NET FileUpload control to design the interface. This is the code: <script runat="server"> Sub Page_Load(.....) If (Page.IsPostBack) Then
0
8407
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8837
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8512
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6175
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.