473,320 Members | 1,853 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,320 software developers and data experts.

All New IIS virtual directories with ASP.NET throw exception "initial character not valid"

Pao
Hi all

For all NEW sites (virtual directories) that I create, I receive
always the same error:
(I translate so may be a little different)

Impossible to visualize the XML page
Impossible to visualize the XML input through the XSL sheet. Correct
the error, then click on Update, or try another time.
--------------------------------------------------------------------------------

Name with initial character not valid. Error during the elaboration of
the
resource "http://localhost/ricevute/default.aspx...

<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
-^
I already tried to register with aspnet_regiis.exe -i
and already tried to reinstall the framework 2.0
but nothing to do...

IMPORTANT
Notice that the old directories that I already have with asp.net sites
are running well... I didn't found any support for this problem
anywhere...

Apr 4 '07 #1
12 2303
On Apr 4, 10:07 am, "Pao" <paoloca...@gmail.comwrote:
Hi all

For all NEW sites (virtual directories) that I create, I receive
always the same error:
(I translate so may be a little different)

Impossible to visualize the XML page
Impossible to visualize the XML input through the XSL sheet. Correct
the error, then click on Update, or try another time.

---------------------------------------------------------------------------*-----

Name with initial character not valid. Error during the elaboration of
the
resource "http://localhost/ricevute/default.aspx...

<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
-^

I already tried to register with aspnet_regiis.exe -i
and already tried to reinstall the framework 2.0
but nothing to do...

IMPORTANT
Notice that the old directories that I already have with asp.net sites
are running well... I didn't found any support for this problem
anywhere...
Is your virtual directory configured as an application in IIS or not?
If yes, I would check an Application Settings in IIS (virt.directory -
properties) and ASP.NET tab. Do you have all files in the right place
(/BIN, web.config)?

Apr 4 '07 #2
Pao
>
Is your virtual directory configured as an application in IIS or not?
If yes, I would check an Application Settings in IIS (virt.directory -
properties) and ASP.NET tab. Do you have all files in the right place
(/BIN, web.config)?- Hide quoted text -
Yes, the virtual directory is configured as application in IIS.
But in the directory there isn't any BIN directory or web.config file.

When I create a virtual directory as an application in IIS, and then I
open it with Visual Web Developer, I see a message saying that the
directory is not configured to work with asp.net, and Vis Web Dev ask
if I want to configure it now.
I answer Yes and I wait for a while, but no BIN directory and
web.config files are created, and if I run a page (show in browser) I
get the error.
Apr 4 '07 #3
Pao
On Apr 4, 11:05 am, "Pao" <paoloca...@gmail.comwrote:
Is your virtual directory configured as an application in IIS or not?
If yes, I would check an Application Settings in IIS (virt.directory -
properties) and ASP.NET tab. Do you have all files in the right place
(/BIN, web.config)?- Hide quoted text -

Yes, the virtual directory is configured as application in IIS.
But in the directory there isn't any BIN directory or web.config file.

When I create a virtual directory as an application in IIS, and then I
open it with Visual Web Developer, I see a message saying that the
directory is not configured to work with asp.net, and Vis Web Dev ask
if I want to configure it now.
I answer Yes and I wait for a while, but no BIN directory and
web.config files are created, and if I run a page (show in browser) I
get the error.
I also tried to copy the content of a directory that works well to my
new directory.
I open IIS and all settings seem good
(- asp.net enabled version 2.0.50727
- virtual directory correct
- file location corresponding to the correct web.config file)
I try to open it with IE but I get the same error (initial character
not valid)

Apr 4 '07 #4
On Apr 4, 11:05 am, "Pao" <paoloca...@gmail.comwrote:
Yes, the virtual directory is configured as application in IIS.
But in the directory there isn't any BIN directory or web.config file.
Okay, this is the reason.
When I create a virtual directory as an application in IIS, and then I
open it with Visual Web Developer, I see a message saying that the
directory is not configured to work with asp.net, and Vis Web Dev ask
if I want to configure it now.
I answer Yes and I wait for a while, but no BIN directory and
web.config files are created, and if I run a page (show in browser) I
get the error.
Please follow these instructions

How to: Create IIS Virtual Directories in Visual Web Developer
http://msdn2.microsoft.com/en-us/lib...fs(VS.80).aspx

You might need to delete the existing virtual directory in IIS and re-
create it in VWD

Apr 4 '07 #5
On Apr 4, 11:17 am, "Pao" <paoloca...@gmail.comwrote:
On Apr 4, 11:05 am, "Pao" <paoloca...@gmail.comwrote:
Is your virtual directory configured as an application in IIS or not?
If yes, I would check an Application Settings in IIS (virt.directory -
properties) and ASP.NET tab. Do you have all files in the right place
(/BIN, web.config)?- Hide quoted text -
Yes, the virtual directory is configured as application in IIS.
But in the directory there isn't any BIN directory or web.config file.
When I create a virtual directory as an application in IIS, and then I
open it with Visual Web Developer, I see a message saying that the
directory is not configured to work with asp.net, and Vis Web Dev ask
if I want to configure it now.
I answer Yes and I wait for a while, but no BIN directory and
web.config files are created, and if I run a page (show in browser) I
get the error.

I also tried to copy the content of a directory that works well to my
new directory.
I open IIS and all settings seem good
(- asp.net enabled version 2.0.50727
- virtual directory correct
- file location corresponding to the correct web.config file)
I try to open it with IE but I get the same error (initial character
not valid)
<%@ Page ... CodeFile="Default.aspx.cs" Inherits="_Default" %>

The code above means that you use a code-behind. When you deploy your
application, you are required to deploy the assembly DLL to the Bin
folder. If you use global.asax and web.config, you are required to
deploy these files too.

Apr 4 '07 #6
Pao
On Apr 4, 11:30 am, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
On Apr 4, 11:17 am, "Pao" <paoloca...@gmail.comwrote:


On Apr 4, 11:05 am, "Pao" <paoloca...@gmail.comwrote:
Is your virtual directory configured as an application in IIS or not?
If yes, I would check an Application Settings in IIS (virt.directory -
properties) and ASP.NET tab. Do you have all files in the right place
(/BIN, web.config)?- Hide quoted text -
Yes, the virtual directory is configured as application in IIS.
But in the directory there isn't any BIN directory or web.config file.
When I create a virtual directory as an application in IIS, and then I
open it with Visual Web Developer, I see a message saying that the
directory is not configured to work with asp.net, and Vis Web Dev ask
if I want to configure it now.
I answer Yes and I wait for a while, but no BIN directory and
web.config files are created, and if I run a page (show in browser) I
get the error.
I also tried to copy the content of a directory that works well to my
new directory.
I open IIS and all settings seem good
(- asp.net enabled version 2.0.50727
- virtual directory correct
- file location corresponding to the correct web.config file)
I try to open it with IE but I get the same error (initial character
not valid)

<%@ Page ... CodeFile="Default.aspx.cs" Inherits="_Default" %>

The code above means that you use a code-behind. When you deploy your
application, you are required to deploy the assembly DLL to the Bin
folder. If you use global.asax and web.config, you are required to
deploy these files too.- Hide quoted text -

- Show quoted text -
Already tried, copying all the content of the working web site on the
new web site, including web.config and BIN folder. Nothing to do.
Thank you for the link about creating a web application with visual
web developer; I tried it and it seems to work fine; but if I look
better,
no web.config neither BIN directory are created, and if I click the
"view in browser button" I get the same error.

Apr 4 '07 #7
On Apr 4, 11:50 am, "Pao" <paoloca...@gmail.comwrote:
On Apr 4, 11:30 am, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:


On Apr 4, 11:17 am, "Pao" <paoloca...@gmail.comwrote:
On Apr 4, 11:05 am, "Pao" <paoloca...@gmail.comwrote:
Is your virtual directory configured as an application in IIS or not?
If yes, I would check an Application Settings in IIS (virt.directory -
properties) and ASP.NET tab. Do you have all files in the right place
(/BIN, web.config)?- Hide quoted text -
Yes, the virtual directory is configured as application in IIS.
But in the directory there isn't any BIN directory or web.config file.
When I create a virtual directory as an application in IIS, and then I
open it with Visual Web Developer, I see a message saying that the
directory is not configured to work with asp.net, and Vis Web Dev ask
if I want to configure it now.
I answer Yes and I wait for a while, but no BIN directory and
web.config files are created, and if I run a page (show in browser) I
get the error.
I also tried to copy the content of a directory that works well to my
new directory.
I open IIS and all settings seem good
(- asp.net enabled version 2.0.50727
- virtual directory correct
- file location corresponding to the correct web.config file)
I try to open it with IE but I get the same error (initial character
not valid)
<%@ Page ... CodeFile="Default.aspx.cs" Inherits="_Default" %>
The code above means that you use a code-behind. When you deploy your
application, you are required to deploy the assembly DLL to the Bin
folder. If you use global.asax and web.config, you are required to
deploy these files too.- Hide quoted text -
- Show quoted text -

Already tried, copying all the content of the working web site on the
new web site, including web.config and BIN folder. Nothing to do.
Thank you for the link about creating a web application with visual
web developer; I tried it and it seems to work fine; but if I look
better,
no web.config neither BIN directory are created, and if I click the
"view in browser button" I get the same error.- Hide quoted text -

- Show quoted text -
What version of VWD do you use, a Visual Web Developer Express?

Look at this thread:
http://groups.google.com/group/micro...3e9abca510a365

Visual Web Developer (General Info)
http://msdn2.microsoft.com/en-us/lib...93(VS.80).aspx

Apr 4 '07 #8
Pao
On Apr 4, 12:14 pm, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
On Apr 4, 11:50 am, "Pao" <paoloca...@gmail.comwrote:


On Apr 4, 11:30 am, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
On Apr 4, 11:17 am, "Pao" <paoloca...@gmail.comwrote:
On Apr 4, 11:05 am, "Pao" <paoloca...@gmail.comwrote:
Is your virtual directory configured as an application in IIS or not?
If yes, I would check an Application Settings in IIS (virt.directory -
properties) and ASP.NET tab. Do you have all files in the right place
(/BIN, web.config)?- Hide quoted text -
Yes, the virtual directory is configured as application in IIS.
But in the directory there isn't any BIN directory or web.config file.
When I create a virtual directory as an application in IIS, and then I
open it with Visual Web Developer, I see a message saying that the
directory is not configured to work with asp.net, and Vis Web Dev ask
if I want to configure it now.
I answer Yes and I wait for a while, but no BIN directory and
web.config files are created, and if I run a page (show in browser) I
get the error.
I also tried to copy the content of a directory that works well to my
new directory.
I open IIS and all settings seem good
(- asp.net enabled version 2.0.50727
- virtual directory correct
- file location corresponding to the correct web.config file)
I try to open it with IE but I get the same error (initial character
not valid)
<%@ Page ... CodeFile="Default.aspx.cs" Inherits="_Default" %>
The code above means that you use a code-behind. When you deploy your
application, you are required to deploy the assembly DLL to the Bin
folder. If you use global.asax and web.config, you are required to
deploy these files too.- Hide quoted text -
- Show quoted text -
Already tried, copying all the content of the working web site on the
new web site, including web.config and BIN folder. Nothing to do.
Thank you for the link about creating a web application with visual
web developer; I tried it and it seems to work fine; but if I look
better,
no web.config neither BIN directory are created, and if I click the
"view in browser button" I get the same error.- Hide quoted text -
- Show quoted text -

What version of VWD do you use, a Visual Web Developer Express?

Look at this thread:http://groups.google.com/group/micro...framework.aspn...

Visual Web Developer (General Info)http://msdn2.microsoft.com/en-us/lib...3(VS.80).aspx- Hide quoted text -

- Show quoted text -
Thank you Alexey
Yes, I use the express edition.
I followed the links and tried to compile the website with
aspnet_compiler.
I tried both with and without the -u option; the website compiles with
no error; however I try to run with IE and get the same error.
At this point I think the framework is ok, as it compiles fine; and I
think the error is due to IIS that can't configure the new virtual
directories as aspnet applications.

Apr 4 '07 #9
Pao
I saw in:

properties of the virtual directory in IIS --virtual directory -->
configuration --mappings

I don't have all the mappings that the websites that work have; I see
only 9 mappings and is missing also .aspx extension.

So when I create a virtual directory IIS doesn't insert all the
mappings I need. How can I correct this behaviour if I have already
launched aspnet_regiis -i with no result?

Apr 4 '07 #10
re:
How can I correct this behaviour if I have already launched aspnet_regiis -i with no result?
Just running aspnet_regiis -i won't reset all the stuff that needs resetting.

We discussed this some time ago, and the problem was fixed.

1. Make sure the file encoding in web.config is set to UTF-8.

<globalization
requestEncoding="UTF-8"
responseEncoding="UTF-8"
fileEncoding="UTF-8"
/>

2. More importantly, run from whichever installation directory for .Net Framework version you're
using

{
Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
or
Drive:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
}

aspnet_regiis -u and then, immediately after that, run aspnet_regiis -i

If you're using IIS 6.0 ( Windows 2003 Server ), you'll also need to run aspnet_regiis -enable

After that, open a cmd window from the "run" menu in the Start button, and run "iisreset".

When you unregister and reregister the .Net Framework (you don't need to physically remove
anything),
the ASP.NET account gets reset and all the mappings are installed correctly.

Just running aspnet_regiis -i doesn't reset the ASP.NET account nor the mappings.

Let us know if that works.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Pao" <pa********@gmail.comwrote in message
news:11**********************@q75g2000hsh.googlegr oups.com...
>I saw in:

properties of the virtual directory in IIS --virtual directory -->
configuration --mappings

I don't have all the mappings that the websites that work have; I see
only 9 mappings and is missing also .aspx extension.

So when I create a virtual directory IIS doesn't insert all the
mappings I need. How can I correct this behaviour if I have already
launched aspnet_regiis -i with no result?

Apr 4 '07 #11
Pao
On Apr 4, 4:48 pm, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
re:
How can I correct this behaviour if I have already launched aspnet_regiis -i with no result?

Just running aspnet_regiis -i won't reset all the stuff that needs resetting.

We discussed this some time ago, and the problem was fixed.

1. Make sure the file encoding in web.config is set to UTF-8.

<globalization
requestEncoding="UTF-8"
responseEncoding="UTF-8"
fileEncoding="UTF-8"
/>

2. More importantly, run from whichever installation directory for .Net Framework version you're
using

{
Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
or
Drive:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

}

aspnet_regiis -u and then, immediately after that, run aspnet_regiis -i

If you're using IIS 6.0 ( Windows 2003 Server ), you'll also need to run aspnet_regiis -enable

After that, open a cmd window from the "run" menu in the Start button, and run "iisreset".

When you unregister and reregister the .Net Framework (you don't need to physically remove
anything),
the ASP.NET account gets reset and all the mappings are installed correctly.

Just running aspnet_regiis -i doesn't reset the ASP.NET account nor the mappings.

Let us know if that works.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
==================================="Pao" <paoloca...@gmail.comwrote in message

news:11**********************@q75g2000hsh.googlegr oups.com...
I saw in:
properties of the virtual directory in IIS --virtual directory -->
configuration --mappings
I don't have all the mappings that the websites that work have; I see
only 9 mappings and is missing also .aspx extension.
So when I create a virtual directory IIS doesn't insert all the
mappings I need. How can I correct this behaviour if I have already
launched aspnet_regiis -i with no result?- Hide quoted text -

- Show quoted text -
Thank you very much now it works, I followed line by line what you
wrote and, after the iis reset, all the mappings are restored (both in
the default eb site and in the virtual directories)

Apr 4 '07 #12
re:
!Thank you very much now it works, I followed line by line what you
!wrote and, after the iis reset, all the mappings are restored (both in
!the default web site and in the virtual directories)

Great news! Glad to know you're up and running again!


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Pao" <pa********@gmail.comwrote in message
news:11**********************@y80g2000hsf.googlegr oups.com...
On Apr 4, 4:48 pm, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
re:
How can I correct this behaviour if I have already launched aspnet_regiis -i with no result?

Just running aspnet_regiis -i won't reset all the stuff that needs resetting.

We discussed this some time ago, and the problem was fixed.

1. Make sure the file encoding in web.config is set to UTF-8.

<globalization
requestEncoding="UTF-8"
responseEncoding="UTF-8"
fileEncoding="UTF-8"
/>

2. More importantly, run from whichever installation directory for .Net Framework version you're
using

{
Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
or
Drive:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

}

aspnet_regiis -u and then, immediately after that, run aspnet_regiis -i

If you're using IIS 6.0 ( Windows 2003 Server ), you'll also need to run aspnet_regiis -enable

After that, open a cmd window from the "run" menu in the Start button, and run "iisreset".

When you unregister and reregister the .Net Framework (you don't need to physically remove
anything),
the ASP.NET account gets reset and all the mappings are installed correctly.

Just running aspnet_regiis -i doesn't reset the ASP.NET account nor the mappings.

Let us know if that works.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
==================================="Pao" <paoloca...@gmail.comwrote in message

news:11**********************@q75g2000hsh.googlegr oups.com...
I saw in:
properties of the virtual directory in IIS --virtual directory -->
configuration --mappings
I don't have all the mappings that the websites that work have; I see
only 9 mappings and is missing also .aspx extension.
So when I create a virtual directory IIS doesn't insert all the
mappings I need. How can I correct this behaviour if I have already
launched aspnet_regiis -i with no result?- Hide quoted text -

- Show quoted text -
Thank you very much now it works, I followed line by line what you
wrote and, after the iis reset, all the mappings are restored (both in
the default eb site and in the virtual directories)
Apr 4 '07 #13

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

Similar topics

0
by: Tao | last post by:
I just upgraded .NET framework to 1.1 and VS.Net to 2003 version and tried to test it out. I created an ASP.NET project using the wizard and tried to run it by hitting "F5". I got an exception:...
11
by: Jim H | last post by:
I am trying to go through my Outlook (2003) address book. The code goes through the Items list and prints all the last names but after it hits 114 (out or 126 contacts) I get a "sepcified cast is...
13
by: Jack MacRank | last post by:
Hello, I'm coding a webform application in C# (ASP.NET 1.1 SP1 with VS.NET 2003 Pro on WinXP SP2 using IIS 5.1). I created a seperate "data" class to house all the MySQL connection and sql...
11
by: Roy Lawson | last post by:
I have no idea what is going on here. I wrote a simple application in VB.NET to generate a Crystal Report, and I am now trying to move it to ASP.NET with Crstal Enterprise. I wish I could tell...
8
by: Charles | last post by:
I do not understand why I am getting a "Specified cast is not valid" error, since it has worked before. Something has changed and I am not really sure what it could be. I am looking for something...
2
by: Fabian | last post by:
Hi, I work with asp.net 2.0 and I have a intermittent error, only happens a few times a day. In the page I evaluate a Query String and then I get data form a database. The code snipped: ...
8
by: Pieter | last post by:
Hi, I'm having some weird problem using the BackGroundWorker in an Outlook (2003) Add-In, with VB.NET 2005: I'm using the BackGroundWorker to get the info of some mailitems, and after each item...
3
by: Pieter Coucke | last post by:
Hi, In my VB.NET 2005 application I'm generating and sending emails using the outlook-object model (2003). When a mail is Send (MailObject_Send), I raise an event in a global class, that is...
3
by: =?Utf-8?B?UGF1bCBQcmV3ZXR0?= | last post by:
I'm attempting to use LINQ to insert a record into a child table and I'm receiving a "Specified cast is not valid" error that has something to do w/ the keys involved. The stack trace is: ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.