Saturday, March 31, 2012
strange authentication dialog
I'm developing a website and deployed on webserver, it always
display an authentication dialog that user must login with valid
Windows user. Would anyone helps to instruct how to prohibit this
dialog?
Some information provides for you:
1) Dev softs:
- VS 2005, ASP.NET 2.0, SQL Server 2005 Enterprise edition
2) Server:
a) Website Directory security:
- Allow anonymous access (IUSR_Server)
- Integrated Windows authentication.
b) OS: Windows 2003 Server.
The particular note is when deplying other Windows 2003 Server PC, it
works fine without any authentication dialog although the configuration
is exactly the same.
Some no - effective solutions:
- Remove "Integrated Windows authentication": result of "you are
unauthorized to ..."
- Add permission for user Evryone, Anonymous Logon, Network Service.
Very appreciated for any hint.
KNCKNC,
You should anyway remove the "Integrated WIndows Authentication"
setting from IIS. Having done that, you should make sure that the
physical directory that you have your website in has permissions for
the Network Service. Thirdly, what kind of authentication have you
specified for your web site (typically a setting in your web.config
file). Try checking that.
- Vaibhav
On Nov 2, 1:25 pm, "KNC" <k...@.glassegg.com> wrote:
> Hi all,
> I'm developing a website and deployed on webserver, it always
> display an authentication dialog that user must login with valid
> Windows user. Would anyone helps to instruct how to prohibit this
> dialog?
> Some information provides for you:
> 1) Dev softs:
> - VS 2005, ASP.NET 2.0, SQL Server 2005 Enterprise edition
> 2) Server:
> a) Website Directory security:
> - Allow anonymous access (IUSR_Server)
> - Integrated Windows authentication.
> b) OS: Windows 2003 Server.
> The particular note is when deplying other Windows 2003 Server PC, it
> works fine without any authentication dialog although the configuration
> is exactly the same.
> Some no - effective solutions:
> - Remove "Integrated Windows authentication": result of "you are
> unauthorized to ..."
> - Add permission for user Evryone, Anonymous Logon, Network Service.
> Very appreciated for any hint.
> KNC
Hi V,
Thanks for your help. But as my message, I already tried to remove
"Integrated Windows authentication" and add user "NETWORK SERVICE" into
user list of my folder of website (under wwwroot) but no effect.
I've just re-tried as your instruction but it is still the same
phenomenon.
FYI, the authentication type of web.config is <authentication
mode="Forms">
Moreover, if I setting the Anonymous user account is a power user
(such as Administrator), it works fine, no authentication dialog at
all.
Would you guys pls give the root cause of this problem?
Thanks in advance,
KNC
V wrote:
> KNC,
> You should anyway remove the "Integrated WIndows Authentication"
> setting from IIS. Having done that, you should make sure that the
> physical directory that you have your website in has permissions for
> the Network Service. Thirdly, what kind of authentication have you
> specified for your web site (typically a setting in your web.config
> file). Try checking that.
> - Vaibhav
> On Nov 2, 1:25 pm, "KNC" <k...@.glassegg.com> wrote:
KNC,
if you have configured Forms authentication in your application, have
you implemented it in your pages? To be honest, I am not entirely sure
why your application is behaving this way (need one those experts to
answer on your thread :) ). However, i am trying to think of all the
things that I do when i setup Forms Authentication based web-app as I
have NEVER faced this problem.
Cheers,
- V
KNC wrote:
> Hi V,
> Thanks for your help. But as my message, I already tried to remove
> "Integrated Windows authentication" and add user "NETWORK SERVICE" into
> user list of my folder of website (under wwwroot) but no effect.
> I've just re-tried as your instruction but it is still the same
> phenomenon.
> FYI, the authentication type of web.config is <authentication
> mode="Forms">
> Moreover, if I setting the Anonymous user account is a power user
> (such as Administrator), it works fine, no authentication dialog at
> all.
> Would you guys pls give the root cause of this problem?
> Thanks in advance,
> KNC
> V wrote:
strange authentication dialog
I'm developing a website and deployed on webserver, it always
display an authentication dialog that user must login with valid
Windows user. Would anyone helps to instruct how to prohibit this
dialog?
Some information provides for you:
1) Dev softs:
- VS 2005, ASP.NET 2.0, SQL Server 2005 Enterprise edition
2) Server:
a) Website Directory security:
- Allow anonymous access (IUSR_Server)
- Integrated Windows authentication.
b) OS: Windows 2003 Server.
The particular note is when deplying other Windows 2003 Server PC, it
works fine without any authentication dialog although the configuration
is exactly the same.
Some no - effective solutions:
- Remove "Integrated Windows authentication": result of "you are
unauthorized to ..."
- Add permission for user Evryone, Anonymous Logon, Network Service.
Very appreciated for any hint.
KNCKNC,
You should anyway remove the "Integrated WIndows Authentication"
setting from IIS. Having done that, you should make sure that the
physical directory that you have your website in has permissions for
the Network Service. Thirdly, what kind of authentication have you
specified for your web site (typically a setting in your web.config
file). Try checking that.
- Vaibhav
On Nov 2, 1:25 pm, "KNC" <k...@.glassegg.comwrote:
Quote:
Originally Posted by
Hi all,
>
I'm developing a website and deployed on webserver, it always
display an authentication dialog that user must login with valid
Windows user. Would anyone helps to instruct how to prohibit this
dialog?
Some information provides for you:
1) Dev softs:
- VS 2005, ASP.NET 2.0, SQL Server 2005 Enterprise edition
2) Server:
a) Website Directory security:
- Allow anonymous access (IUSR_Server)
- Integrated Windows authentication.
b) OS: Windows 2003 Server.
>
The particular note is when deplying other Windows 2003 Server PC, it
works fine without any authentication dialog although the configuration
is exactly the same.
Some no - effective solutions:
- Remove "Integrated Windows authentication": result of "you are
unauthorized to ..."
- Add permission for user Evryone, Anonymous Logon, Network Service.
>
Very appreciated for any hint.
KNC
Hi V,
Thanks for your help. But as my message, I already tried to remove
"Integrated Windows authentication" and add user "NETWORK SERVICE" into
user list of my folder of website (under wwwroot) but no effect.
I've just re-tried as your instruction but it is still the same
phenomenon.
FYI, the authentication type of web.config is <authentication
mode="Forms">
Moreover, if I setting the Anonymous user account is a power user
(such as Administrator), it works fine, no authentication dialog at
all.
Would you guys pls give the root cause of this problem?
Thanks in advance,
KNC
V wrote:
Quote:
Originally Posted by
KNC,
>
You should anyway remove the "Integrated WIndows Authentication"
setting from IIS. Having done that, you should make sure that the
physical directory that you have your website in has permissions for
the Network Service. Thirdly, what kind of authentication have you
specified for your web site (typically a setting in your web.config
file). Try checking that.
>
- Vaibhav
>
On Nov 2, 1:25 pm, "KNC" <k...@.glassegg.comwrote:
Quote:
Originally Posted by
Hi all,
I'm developing a website and deployed on webserver, it always
display an authentication dialog that user must login with valid
Windows user. Would anyone helps to instruct how to prohibit this
dialog?
Some information provides for you:
1) Dev softs:
- VS 2005, ASP.NET 2.0, SQL Server 2005 Enterprise edition
2) Server:
a) Website Directory security:
- Allow anonymous access (IUSR_Server)
- Integrated Windows authentication.
b) OS: Windows 2003 Server.
The particular note is when deplying other Windows 2003 Server PC, it
works fine without any authentication dialog although the configuration
is exactly the same.
Some no - effective solutions:
- Remove "Integrated Windows authentication": result of "you are
unauthorized to ..."
- Add permission for user Evryone, Anonymous Logon, Network Service.
Very appreciated for any hint.
KNC
KNC,
if you have configured Forms authentication in your application, have
you implemented it in your pages? To be honest, I am not entirely sure
why your application is behaving this way (need one those experts to
answer on your thread :) ). However, i am trying to think of all the
things that I do when i setup Forms Authentication based web-app as I
have NEVER faced this problem.
Cheers,
- V
KNC wrote:
Quote:
Originally Posted by
Hi V,
>
Thanks for your help. But as my message, I already tried to remove
"Integrated Windows authentication" and add user "NETWORK SERVICE" into
user list of my folder of website (under wwwroot) but no effect.
I've just re-tried as your instruction but it is still the same
phenomenon.
FYI, the authentication type of web.config is <authentication
mode="Forms">
Moreover, if I setting the Anonymous user account is a power user
(such as Administrator), it works fine, no authentication dialog at
all.
>
Would you guys pls give the root cause of this problem?
>
Thanks in advance,
KNC
>
V wrote:
Quote:
Originally Posted by
KNC,
You should anyway remove the "Integrated WIndows Authentication"
setting from IIS. Having done that, you should make sure that the
physical directory that you have your website in has permissions for
the Network Service. Thirdly, what kind of authentication have you
specified for your web site (typically a setting in your web.config
file). Try checking that.
- Vaibhav
On Nov 2, 1:25 pm, "KNC" <k...@.glassegg.comwrote:
Quote:
Originally Posted by
Hi all,
>
I'm developing a website and deployed on webserver, it always
display an authentication dialog that user must login with valid
Windows user. Would anyone helps to instruct how to prohibit this
dialog?
Some information provides for you:
1) Dev softs:
- VS 2005, ASP.NET 2.0, SQL Server 2005 Enterprise edition
2) Server:
a) Website Directory security:
- Allow anonymous access (IUSR_Server)
- Integrated Windows authentication.
b) OS: Windows 2003 Server.
>
The particular note is when deplying other Windows 2003 Server PC, it
works fine without any authentication dialog although the configuration
is exactly the same.
Some no - effective solutions:
- Remove "Integrated Windows authentication": result of "you are
unauthorized to ..."
- Add permission for user Evryone, Anonymous Logon, Network Service.
>
Very appreciated for any hint.
KNC
strange authentication problem...
i've got a website i created, that i've put onto my test server on the web.
I have a login page, that when the user comes to it, it first pops up a
windows authentication dialog box, and i dont know why? i click cancel on it
and the page still works as normal.
How can i remove this, and why is it appearing?
i am also not using any .NET authentication methods or anything..
thanks,you can set authentication mode in Web.config file
<authentication mode="Forms">
<forms name="login" loginUrl="login.aspx" protection="All" />
</authentication>
"Paul M" <milsnips@.hotmail.com> д?
news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> hi there,
> i've got a website i created, that i've put onto my test server on the
web.
> I have a login page, that when the user comes to it, it first pops up a
> windows authentication dialog box, and i dont know why? i click cancel on
it
> and the page still works as normal.
> How can i remove this, and why is it appearing?
> i am also not using any .NET authentication methods or anything..
> thanks,
>
thanks, but this isnt exactly what i am after..
What the problem is that i already have a login page which all works
fine...however i have 3 pages in my web app, that whenever i go to their
URL, they always popup the windows authentication window, when it shouldnt
appear..i have no authentication code for these pages, nor do i want any.
web.config is also set to <authentication mode="None" /> but still no luck.
Paull
"
news:uy1G0C9HEHA.2300@.tk2msftngp13.phx.gbl...
> you can set authentication mode in Web.config file
> <authentication mode="Forms">
> <forms name="login" loginUrl="login.aspx" protection="All" />
> </authentication>
> "Paul M" <milsnips@.hotmail.com> д?
> news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> web.
on
> it
>
it's really a trouble,i have no ideas about that.
if you have set authentication mode="None", it's will work
try again
<authentication mode="None">
<allow users="?"/>
</authentication>
"Paul M" <milsnips@.hotmail.com> д?
:uLl5APAIEHA.828@.TK2MSFTNGP12.phx.gbl...
> thanks, but this isnt exactly what i am after..
> What the problem is that i already have a login page which all works
> fine...however i have 3 pages in my web app, that whenever i go to their
> URL, they always popup the windows authentication window, when it shouldnt
> appear..i have no authentication code for these pages, nor do i want any.
> web.config is also set to <authentication mode="None" /> but still no
luck.
> Paull
> "
> news:uy1G0C9HEHA.2300@.tk2msftngp13.phx.gbl...
<allow roles="Admins"/>
a
> on
>
strange authentication problem...
i've got a website i created, that i've put onto my test server on the web.
I have a login page, that when the user comes to it, it first pops up a
windows authentication dialog box, and i dont know why? i click cancel on it
and the page still works as normal.
How can i remove this, and why is it appearing?
i am also not using any .NET authentication methods or anything..
thanks,you can set authentication mode in Web.config file
<authentication mode="Forms">
<forms name="login" loginUrl="login.aspx" protection="All" />
</authentication
"Paul M" <milsnips@.hotmail.com> д?
news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> hi there,
> i've got a website i created, that i've put onto my test server on the
web.
> I have a login page, that when the user comes to it, it first pops up a
> windows authentication dialog box, and i dont know why? i click cancel on
it
> and the page still works as normal.
> How can i remove this, and why is it appearing?
> i am also not using any .NET authentication methods or anything..
> thanks,
thanks, but this isnt exactly what i am after..
What the problem is that i already have a login page which all works
fine...however i have 3 pages in my web app, that whenever i go to their
URL, they always popup the windows authentication window, when it shouldnt
appear..i have no authentication code for these pages, nor do i want any.
web.config is also set to <authentication mode="None" /> but still no luck.
Paull
"coollzh" <coollzh@.hotmail.com> wrote in message
news:uy1G0C9HEHA.2300@.tk2msftngp13.phx.gbl...
> you can set authentication mode in Web.config file
> <authentication mode="Forms">
> <forms name="login" loginUrl="login.aspx" protection="All" />
> </authentication>
> "Paul M" <milsnips@.hotmail.com> д?
> news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> > hi there,
> > i've got a website i created, that i've put onto my test server on the
> web.
> > I have a login page, that when the user comes to it, it first pops up a
> > windows authentication dialog box, and i dont know why? i click cancel
on
> it
> > and the page still works as normal.
> > How can i remove this, and why is it appearing?
> > i am also not using any .NET authentication methods or anything..
> > thanks,
strange authentication problem...
i've got a website i created, that i've put onto my test server on the web.
I have a login page, that when the user comes to it, it first pops up a
windows authentication dialog box, and i dont know why? i click cancel on it
and the page still works as normal.
How can i remove this, and why is it appearing?
i am also not using any .NET authentication methods or anything..
thanks,you can set authentication mode in Web.config file
<authentication mode="Forms">
<forms name="login" loginUrl="login.aspx" protection="All" />
</authentication
"Paul M" <milsnips@.hotmail.com> д?
news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> hi there,
> i've got a website i created, that i've put onto my test server on the
web.
> I have a login page, that when the user comes to it, it first pops up a
> windows authentication dialog box, and i dont know why? i click cancel on
it
> and the page still works as normal.
> How can i remove this, and why is it appearing?
> i am also not using any .NET authentication methods or anything..
> thanks,
you can set authentication mode in Web.config file
<authentication mode="Forms">
<forms name="login" loginUrl="login.aspx" protection="All" />
</authentication
"Paul M" <milsnips@.hotmail.com> д?
news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> hi there,
> i've got a website i created, that i've put onto my test server on the
web.
> I have a login page, that when the user comes to it, it first pops up a
> windows authentication dialog box, and i dont know why? i click cancel on
it
> and the page still works as normal.
> How can i remove this, and why is it appearing?
> i am also not using any .NET authentication methods or anything..
> thanks,
thanks, but this isnt exactly what i am after..
What the problem is that i already have a login page which all works
fine...however i have 3 pages in my web app, that whenever i go to their
URL, they always popup the windows authentication window, when it shouldnt
appear..i have no authentication code for these pages, nor do i want any.
web.config is also set to <authentication mode="None" /> but still no luck.
Paull
"coollzh" <coollzh@.hotmail.com> wrote in message
news:uy1G0C9HEHA.2300@.tk2msftngp13.phx.gbl...
> you can set authentication mode in Web.config file
> <authentication mode="Forms">
> <forms name="login" loginUrl="login.aspx" protection="All" />
> </authentication>
> "Paul M" <milsnips@.hotmail.com> д?
> news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> > hi there,
> > i've got a website i created, that i've put onto my test server on the
> web.
> > I have a login page, that when the user comes to it, it first pops up a
> > windows authentication dialog box, and i dont know why? i click cancel
on
> it
> > and the page still works as normal.
> > How can i remove this, and why is it appearing?
> > i am also not using any .NET authentication methods or anything..
> > thanks,
thanks, but this isnt exactly what i am after..
What the problem is that i already have a login page which all works
fine...however i have 3 pages in my web app, that whenever i go to their
URL, they always popup the windows authentication window, when it shouldnt
appear..i have no authentication code for these pages, nor do i want any.
web.config is also set to <authentication mode="None" /> but still no luck.
Paull
"coollzh" <coollzh@.hotmail.com> wrote in message
news:uy1G0C9HEHA.2300@.tk2msftngp13.phx.gbl...
> you can set authentication mode in Web.config file
> <authentication mode="Forms">
> <forms name="login" loginUrl="login.aspx" protection="All" />
> </authentication>
> "Paul M" <milsnips@.hotmail.com> д?
> news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> > hi there,
> > i've got a website i created, that i've put onto my test server on the
> web.
> > I have a login page, that when the user comes to it, it first pops up a
> > windows authentication dialog box, and i dont know why? i click cancel
on
> it
> > and the page still works as normal.
> > How can i remove this, and why is it appearing?
> > i am also not using any .NET authentication methods or anything..
> > thanks,
it's really a trouble,i have no ideas about that.
if you have set authentication mode="None", it's will work
try again
<authentication mode="None"
<allow users="?"/>
</authentication
"Paul M" <milsnips@.hotmail.com> д?
:uLl5APAIEHA.828@.TK2MSFTNGP12.phx.gbl...
> thanks, but this isnt exactly what i am after..
> What the problem is that i already have a login page which all works
> fine...however i have 3 pages in my web app, that whenever i go to their
> URL, they always popup the windows authentication window, when it shouldnt
> appear..i have no authentication code for these pages, nor do i want any.
> web.config is also set to <authentication mode="None" /> but still no
luck.
> Paull
> "coollzh" <coollzh@.hotmail.com> wrote in message
> news:uy1G0C9HEHA.2300@.tk2msftngp13.phx.gbl...
> > you can set authentication mode in Web.config file
> > <authentication mode="Forms">
> > <forms name="login" loginUrl="login.aspx" protection="All" />
<allow roles="Admins"/
> > </authentication>
> > "Paul M" <milsnips@.hotmail.com> д?
> > news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> > > hi there,
> > > > i've got a website i created, that i've put onto my test server on the
> > web.
> > > > I have a login page, that when the user comes to it, it first pops up
a
> > > windows authentication dialog box, and i dont know why? i click cancel
> on
> > it
> > > and the page still works as normal.
> > > > How can i remove this, and why is it appearing?
> > > i am also not using any .NET authentication methods or anything..
> > > > thanks,
> >
strange authentication problem...
i've got a website i created, that i've put onto my test server on the web.
I have a login page, that when the user comes to it, it first pops up a
windows authentication dialog box, and i dont know why? i click cancel on it
and the page still works as normal.
How can i remove this, and why is it appearing?
i am also not using any .NET authentication methods or anything..
thanks,you can set authentication mode in Web.config file
<authentication mode="Forms">
<forms name="login" loginUrl="login.aspx" protection="All" />
</authentication
"Paul M" <milsnips@.hotmail.com> д?
news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> hi there,
> i've got a website i created, that i've put onto my test server on the
web.
> I have a login page, that when the user comes to it, it first pops up a
> windows authentication dialog box, and i dont know why? i click cancel on
it
> and the page still works as normal.
> How can i remove this, and why is it appearing?
> i am also not using any .NET authentication methods or anything..
> thanks,
thanks, but this isnt exactly what i am after..
What the problem is that i already have a login page which all works
fine...however i have 3 pages in my web app, that whenever i go to their
URL, they always popup the windows authentication window, when it shouldnt
appear..i have no authentication code for these pages, nor do i want any.
web.config is also set to <authentication mode="None" /> but still no luck.
Paull
"coollzh" <coollzh@.hotmail.com> wrote in message
news:uy1G0C9HEHA.2300@.tk2msftngp13.phx.gbl...
> you can set authentication mode in Web.config file
> <authentication mode="Forms">
> <forms name="login" loginUrl="login.aspx" protection="All" />
> </authentication>
> "Paul M" <milsnips@.hotmail.com> д?
> news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> > hi there,
> > i've got a website i created, that i've put onto my test server on the
> web.
> > I have a login page, that when the user comes to it, it first pops up a
> > windows authentication dialog box, and i dont know why? i click cancel
on
> it
> > and the page still works as normal.
> > How can i remove this, and why is it appearing?
> > i am also not using any .NET authentication methods or anything..
> > thanks,
thanks, but this isnt exactly what i am after..
What the problem is that i already have a login page which all works
fine...however i have 3 pages in my web app, that whenever i go to their
URL, they always popup the windows authentication window, when it shouldnt
appear..i have no authentication code for these pages, nor do i want any.
web.config is also set to <authentication mode="None" /> but still no luck.
Paull
"coollzh" <coollzh@.hotmail.com> wrote in message
news:uy1G0C9HEHA.2300@.tk2msftngp13.phx.gbl...
> you can set authentication mode in Web.config file
> <authentication mode="Forms">
> <forms name="login" loginUrl="login.aspx" protection="All" />
> </authentication>
> "Paul M" <milsnips@.hotmail.com> д?
> news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> > hi there,
> > i've got a website i created, that i've put onto my test server on the
> web.
> > I have a login page, that when the user comes to it, it first pops up a
> > windows authentication dialog box, and i dont know why? i click cancel
on
> it
> > and the page still works as normal.
> > How can i remove this, and why is it appearing?
> > i am also not using any .NET authentication methods or anything..
> > thanks,
it's really a trouble,i have no ideas about that.
if you have set authentication mode="None", it's will work
try again
<authentication mode="None"
<allow users="?"/>
</authentication
"Paul M" <milsnips@.hotmail.com> д?
:uLl5APAIEHA.828@.TK2MSFTNGP12.phx.gbl...
> thanks, but this isnt exactly what i am after..
> What the problem is that i already have a login page which all works
> fine...however i have 3 pages in my web app, that whenever i go to their
> URL, they always popup the windows authentication window, when it shouldnt
> appear..i have no authentication code for these pages, nor do i want any.
> web.config is also set to <authentication mode="None" /> but still no
luck.
> Paull
> "coollzh" <coollzh@.hotmail.com> wrote in message
> news:uy1G0C9HEHA.2300@.tk2msftngp13.phx.gbl...
> > you can set authentication mode in Web.config file
> > <authentication mode="Forms">
> > <forms name="login" loginUrl="login.aspx" protection="All" />
<allow roles="Admins"/
> > </authentication>
> > "Paul M" <milsnips@.hotmail.com> д?
> > news:Oux4bs8HEHA.3200@.TK2MSFTNGP10.phx.gbl...
> > > hi there,
> > > > i've got a website i created, that i've put onto my test server on the
> > web.
> > > > I have a login page, that when the user comes to it, it first pops up
a
> > > windows authentication dialog box, and i dont know why? i click cancel
> on
> > it
> > > and the page still works as normal.
> > > > How can i remove this, and why is it appearing?
> > > i am also not using any .NET authentication methods or anything..
> > > > thanks,
> >
Wednesday, March 28, 2012
Strange character transformations
I have an ASP.Net website, which allows users to upload a file which is
then inserted into a database.
This is all fine until it reads a line with the string +Anu in it.
It transforms this to this char ? (which, if Googled for, is
described as Unicode Character 'LATIN SMALL LETTER TURNED R WITH HOOK'
(U+027B) or, in Phonetics, as a 'Retroflex approximant'.)
Has anyone seen this behaviour before, and know how to stop it?
The code's simple - here's an example. The ? appears in the output
where the input is +Anu - it's transformed before I can touch it!
using (StreamReader sr = new StreamReader(strFile,
System.Text.Encoding.UTF7)) {
// Read and display lines from the file until the end of the file is
reached.
while ((line = sr.ReadLine()) != null) {
Response.Write(line);
}
}
Regards
AdamLooks like an encoding issue, alright.
Have you tried using the StreamReader constructor that does not require a
character encoding?
"CyberSpyders@.gmail.com" wrote:
Quote:
Originally Posted by
Hi,
>
I have an ASP.Net website, which allows users to upload a file which is
then inserted into a database.
>
This is all fine until it reads a line with the string +Anu in it.
It transforms this to this char ? (which, if Googled for, is
described as Unicode Character 'LATIN SMALL LETTER TURNED R WITH HOOK'
(U+027B) or, in Phonetics, as a 'Retroflex approximant'.)
>
Has anyone seen this behaviour before, and know how to stop it?
The code's simple - here's an example. The ? appears in the output
where the input is +Anu - it's transformed before I can touch it!
>
using (StreamReader sr = new StreamReader(strFile,
System.Text.Encoding.UTF7)) {
// Read and display lines from the file until the end of the file is
reached.
while ((line = sr.ReadLine()) != null) {
Response.Write(line);
}
}
>
Regards
>
Adam
>
>
Graven,
I'm not sure how a 4 letter string like this could be seen as an
encoding issue, but I will certainly give it a go. Thanks for the
suggestion.
Adam
Graven wrote:
Quote:
Originally Posted by
Try to use plain latin-1 encoding. I think it's an unicode
normalization issue, but don't know if StreamReader performs it by
default.
>
>
CyberSpyders@.gmail.com wrote:
Quote:
Originally Posted by
Hi,
I have an ASP.Net website, which allows users to upload a file which is
then inserted into a database.
This is all fine until it reads a line with the string +Anu in it.
It transforms this to this char ? (which, if Googled for, is
described as Unicode Character 'LATIN SMALL LETTER TURNED R WITH HOOK'
(U+027B) or, in Phonetics, as a 'Retroflex approximant'.)
Has anyone seen this behaviour before, and know how to stop it?
The code's simple - here's an example. The ? appears in the output
where the input is +Anu - it's transformed before I can touch it!
using (StreamReader sr = new StreamReader(strFile,
System.Text.Encoding.UTF7)) {
// Read and display lines from the file until the end of the file is
reached.
while ((line = sr.ReadLine()) != null) {
Response.Write(line);
}
}
Regards
Adam
Larry,
You were spot on - changing to UTF8 stopped this transformation. Thanks
It's not quite solved my problem though.
The file is a Text file, each line being a series of files delimited by
the character, as this was unliekley to ever appear in the actual
data.
Unfortunately, UTF8 encoding strips these characters completely. ASCII
encoding, on the other hand, replaces them with ?
Oh the joy of character encoding.
Regards
Adam
Larry Lard wrote:
Quote:
Originally Posted by
This is why you are seeing what you are seeing. UTF7 encodes characters
outside the printable 7 bit range using UTF16 then modified base64, with
+ as the indicator mark for this encoding. I haven't checked, but I
imagine +Anu is the UTF7 encoding of that character. You shouldn't use a
UTF7 reader to read a file that you don't know for sure was produced by
a UTF7 writer.
>
The correct way to read the file depends on what kind of file it is. If
it is text of an unknown encoding, there is no way to be absolutely
sure, but UTF8 is a good starting point. If it's binary data, you
shouldn't be using a TextReader class at all.
Strange compilation error
From time to time, I receive following error message when trying to access
my website.
When the error occurs, I have to recompile my dll until the error disappears
(this without changing anything in my code).
Where does this error come from ? What can I do to solve the problem ?
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: CS0030: Cannot convert type
'System.Web.HttpApplication' to 'ASP.Global_asax'
Source Error:
Line 438: protected ASP.Global_asax ApplicationInstance {
Line 439: get {
Line 440: return
((ASP.Global_asax)(this.Context.ApplicationInstanc e));
Line 441: }
Line 442: }
Source File: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET
Files\emagic.net.website\1a713704\55d0ac6a\5rffbzu b.0.cs Line: 440Hi,
As you can figure out its a prpblem with dynamic compilation of pages
(and asax). do you write any code in your application asax file? if so
can you post it or at least tell what you are doing ? usually those
errors ate outcome of code being write in asax code behind.
Natty Gur[MVP]
blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Strange compilation error
From time to time, I receive following error message when trying to access
my website.
When the error occurs, I have to recompile my dll until the error disappears
(this without changing anything in my code).
Where does this error come from ? What can I do to solve the problem ?
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: CS0030: Cannot convert type
'System.Web.HttpApplication' to 'ASP.Global_asax'
Source Error:
Line 438: protected ASP.Global_asax ApplicationInstance {
Line 439: get {
Line 440: return
((ASP.Global_asax)(this.Context.ApplicationInstance));
Line 441: }
Line 442: }
Source File: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\emagic.net.website\1a713704\55d0ac6a\5rffbzub.0.cs Line: 440Hi,
As you can figure out its a prpblem with dynamic compilation of pages
(and asax). do you write any code in your application asax file? if so
can you post it or at least tell what you are doing ? usually those
errors ate outcome of code being write in asax code behind.
Natty Gur[MVP]
blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
Monday, March 26, 2012
Strange DataView Problem
I need some clarification about a stange DataView behaviour I have noticed. I am developing a dynamic website that is binding data (from an Access db) to a datagrid. I use a cached dataset to save trips to the db, here is the code...
'populate the Cache Variable that stores the Web Content Dataset
Public Function PopulateWebContentDataset(Optional ByVal blnRepopulate As Boolean = False) As BooleanDim ds As New DataSet()
'check if cached dataset already exists
If Current.Cache("WebContent") Is Nothing = False Then
'the cached variable already exists
Return True
End If'get the Web Content from the database
Dim cn As New OleDbConnection(AppSettings("cnStringWebContent"))
Dim da As New OleDbDataAdapter("SELECT * FROM tblWebContent", cn)Try
'fill the Web Content dataset with records from the database
da.Fill(ds, "tblWebContent")
If ds.Tables("tblWebContent").Rows.Count > 0 Then
'add the dataset to the cache
Current.Cache.Insert("WebContent", ds, _
New System.Web.Caching.CacheDependency(AppSettings("dbPathWebContent")), _
DateTime.Now.AddDays(1), Current.Cache.NoSlidingExpiration, _
System.Web.Caching.CacheItemPriority.Normal, Nothing)
Return True
Else
'no records were found
Current.Cache.Remove("WebContent")
Current.Cache("WebContent") = Nothing
Return False
End IfCatch DefaultExc As Exception
Finally
cn.Dispose()
da.Dispose()
ds.Dispose()
End TryEnd Function
Public Function BindPageContent(ByRef dgr As DataGrid, ByVal strPage As String, _
Optional ByVal blnRepopulate As Boolean = False) As Boolean
'check if the cache Web Content dataset already exists
If PopulateWebContentDataset(blnRepopulate) = False And blnRepopulate = False Then
'unable to get the information from the database
Return False
End IfDim ds As DataSet
Dim dv As New DataView()Try
ds = Current.Cache("WebContent")
'ds.Tables("tblWebContent").DefaultView.RowFilter = "Page=" & "'" & strPage & "'"
dv = ds.Tables("tblWebContent").DefaultView
dv.RowFilter = "Page=" & "'" & strPage & "'"
dgr.DataSource = dv
dgr.DataBind()Catch DefaultExc As Exception
Finally
ds.Dispose()
dv.Dispose()
End TryEnd Function
My question is, the above code works perfectly the first time the page loads but when I return to this specific page (which should be getting the cached dataset), nothing is displayed. I checked the dataset and it has the correct amount of rows, however, the dataview has a rowcount of 0 (when it previously had a rowcount of 1).
I have done the following to fix this problem, all of which have worked...
1. Instead of getting the dataset from the cache, I connected to the db on each page_load and repopulated the dataset
2. When I bind the datagrid using the dataset as the datasource instead of the dataview, it works...
(ds.tables("tblWebContent").defaultview.rowfilter="Page='" & strPage & "'")
3. When I take out dv.dispose, everything works as expected
I have many instances in my code where I use the exact same code as posted above and it doesn't seem like there is a problem with the DataView. Should I re-examine all my code and remove dataview.dispose()? Does anyone have any suggestions on why this may be happening?Indeed, you shouldn't dispose that object since it's needed when the page execution is done further to display the data on the web form. In fact, it's a strange problem for me too but I would never dispose the dataview... Remember, the dataset object is a disconnected object which doesn't need any connection whatsoever with the database.
Strange Error
I'm getting the following error on when I try to preview webpages from VWD2008. When I upload the pages I can view them fine from my website. Even more stange is it only happens on one certain project and it just started about 10 minutes ago as was fine until then. I have rebooted my computer but that did not help. When I go to view that directory, there are no files in it, nor can I unselect the read-only attribute to delete it.
Compilation Error
Description:An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message:BC30269: 'Public Sub New()' has multiple definitions with identical signatures.
Source Error:
[No relevant source lines]
Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysite\1d37002e\e2be952b\App_Code.stpwyaqr.1.vb Line: 34
Can you show us the code behind for one of the pages that you are getting the error?
Weird on a couple of levels; your post does not display correctly to me, the text is all mashed onto a couple of lines. Fortunately the reply screen shows it ok.
I'm not sure I understand so see if this is correct. When you published the project to the web server it worked fine and the site published ok and is browsable. When you then tried to run the project in VWD to preview locally it gave the error you posted. When you went into the file system on your local machine the directory was blank.
Sound correct so far? If so, are you checking the project directory on your local machine or the temporary directory listed in the error message?
Did you try to do a Clean Project and a Rebuild Project? Are you using the Web Site project or Web Application project?
kraznodar:
I'm not sure I understand so see if this is correct. When you published the project to the web server it worked fine and the site published ok and is browsable. When you then tried to run the project in VWD to preview locally it gave the error you posted. When you went into the file system on your local machine the directory was blank.
Yes that is 100% correct. What is even more odd is the fact that I've been working on this same project for about 7 months, and until a while ago I never got this error. When I tried another project on my computer it ran with no errors. As for the page in question it is all the pages, not just one.
Ohhh, I just tried a rebuild like was suggested and got a bunch of errors relating to a dataset file. I deleted the file in question and now it works 100%
I had copied, then pasted a dataset and that must have corrupted something. I deleted it and no problems.
Guess the lesson is, don't copy/paste a dataset like you can a regular webpage file.
Thanks for the help and suggestions, I'm sure I'll have many more :)
Don't forget to mark noahb's post as the answer. His clean and rebuild led to the discovery of the real issue.
Saturday, March 24, 2012
Strange Errors...Don't Understand
myself an email from global.asax on an application error. In the last two
days I have gotten a "The file '/detail.aspx' does not exits" type
error--with two different file names. In both cases, I searched my entire
source for the '/detail.aspx' reference and it doesn't exist.
What could be causing this error? Text of error email I sent to myself
follows...
The file '/detail.aspx' does not exist.
System.Web.HttpException: The file '/detail.aspx' does not exist. at
System.Web.UI.Util.CheckVirtualFileExists(VirtualP ath virtualPath) at
System.Web.Compilation.BuildManager.GetVPathBuildR esultInternal(VirtualPath
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile) at
System.Web.Compilation.BuildManager.GetVPathBuildR esultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile) at
System.Web.Compilation.BuildManager.GetVirtualPath ObjectFactory(VirtualPath
virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at
System.Web.Compilation.BuildManager.CreateInstance FromVirtualPath(VirtualPath
virtualPath, Type requiredBaseType, HttpContext context, Boolean
allowCrossApp, Boolean noAssert) at
System.Web.UI.PageHandlerFactory.GetHandlerHelper( HttpContext context, String
requestType, VirtualPath virtualPath, String physicalPath) at
System.Web.UI.PageHandlerFactory.System.Web.IHttpH andlerFactory2.GetHandler(HttpContext
context, String requestType, VirtualPath virtualPath, String physicalPath) at
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at
System.Web.HttpApplication.MapHandlerExecutionStep .System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)See if this helps :
http://www.velocityreviews.com/foru...-aspnet-20.html
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
======================================
"Paul Buzza, oldster using new tools" <PaulBuzzaoldsterusingnewtools@.discussions.microsof t.comwrote in message
news:9550498C-9323-4D8A-BA54-555CCFE19734@.microsoft.com...
Quote:
Originally Posted by
>I recently implemented error processing on my .net website, where I send
myself an email from global.asax on an application error. In the last two
days I have gotten a "The file '/detail.aspx' does not exits" type
error--with two different file names. In both cases, I searched my entire
source for the '/detail.aspx' reference and it doesn't exist.
>
What could be causing this error? Text of error email I sent to myself
follows...
>
The file '/detail.aspx' does not exist.
>
System.Web.HttpException: The file '/detail.aspx' does not exist. at
System.Web.UI.Util.CheckVirtualFileExists(VirtualP ath virtualPath) at
System.Web.Compilation.BuildManager.GetVPathBuildR esultInternal(VirtualPath
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile) at
System.Web.Compilation.BuildManager.GetVPathBuildR esultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile) at
System.Web.Compilation.BuildManager.GetVirtualPath ObjectFactory(VirtualPath
virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at
System.Web.Compilation.BuildManager.CreateInstance FromVirtualPath(VirtualPath
virtualPath, Type requiredBaseType, HttpContext context, Boolean
allowCrossApp, Boolean noAssert) at
System.Web.UI.PageHandlerFactory.GetHandlerHelper( HttpContext context, String
requestType, VirtualPath virtualPath, String physicalPath) at
System.Web.UI.PageHandlerFactory.System.Web.IHttpH andlerFactory2.GetHandler(HttpContext
context, String requestType, VirtualPath virtualPath, String physicalPath) at
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at
System.Web.HttpApplication.MapHandlerExecutionStep .System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)
Juan,
Thank you. It was the "click" I needed. My old version of my site had the
named files on which I see the errors. If someone had a saved bookmark to
one of my old pages, this is the error I see. All I have to do is handle the
404 error with a separate error page, and tell the originator to update their
bookmarks.
Paul
"Juan T. Llibre" wrote:
Quote:
Originally Posted by
See if this helps :
>
http://www.velocityreviews.com/foru...-aspnet-20.html
>
>
>
>
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/
======================================
"Paul Buzza, oldster using new tools" <PaulBuzzaoldsterusingnewtools@.discussions.microsof t.comwrote in message
news:9550498C-9323-4D8A-BA54-555CCFE19734@.microsoft.com...
Quote:
Originally Posted by
I recently implemented error processing on my .net website, where I send
myself an email from global.asax on an application error. In the last two
days I have gotten a "The file '/detail.aspx' does not exits" type
error--with two different file names. In both cases, I searched my entire
source for the '/detail.aspx' reference and it doesn't exist.
What could be causing this error? Text of error email I sent to myself
follows...
The file '/detail.aspx' does not exist.
System.Web.HttpException: The file '/detail.aspx' does not exist. at
System.Web.UI.Util.CheckVirtualFileExists(VirtualP ath virtualPath) at
System.Web.Compilation.BuildManager.GetVPathBuildR esultInternal(VirtualPath
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile) at
System.Web.Compilation.BuildManager.GetVPathBuildR esultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile) at
System.Web.Compilation.BuildManager.GetVirtualPath ObjectFactory(VirtualPath
virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at
System.Web.Compilation.BuildManager.CreateInstance FromVirtualPath(VirtualPath
virtualPath, Type requiredBaseType, HttpContext context, Boolean
allowCrossApp, Boolean noAssert) at
System.Web.UI.PageHandlerFactory.GetHandlerHelper( HttpContext context, String
requestType, VirtualPath virtualPath, String physicalPath) at
System.Web.UI.PageHandlerFactory.System.Web.IHttpH andlerFactory2.GetHandler(HttpContext
context, String requestType, VirtualPath virtualPath, String physicalPath) at
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at
System.Web.HttpApplication.MapHandlerExecutionStep .System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)
>
>
>