Thursday, March 29, 2012
PERFORMANCE QUESTION
is the best way ? Using a Xml file to store languages and their
corresponding fields or Using a MS-SQL Database ?
What do you recommend me to have best performance about multilanguage
web-sites?if you are worried about performance, the localized content should be stored
in the cache, which means whether you use XML or a database, the performance
will be excellent.
Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Savas Ates" <in da club> wrote in message
news:OsYNsoBVGHA.5500@.TK2MSFTNGP12.phx.gbl...
>I want to built a web page which is gonna have multiple languages. Which
>one is the best way ? Using a Xml file to store languages and their
>corresponding fields or Using a MS-SQL Database ?
> What do you recommend me to have best performance about multilanguage
> web-sites?
>
It really depends. For large numbers of records, SQL will far outperform
XML. Parsing XML is a relatively slow thing. If you are going to have 10K
records with information regarding different words in different languages,
XML is going to be slow, and so will XPath.
If you have 200 records, well, maybe it doesn't matter as much.
Also, you can use Access as your database, which is file based, so similar
to an XML file in that regard.
You should look at your situation, and see what works best for you. The key
is to box up all the translation code into some methods, so if you switch
implementations, only those few methods have to change.
"Savas Ates" <in da club> wrote in message
news:OsYNsoBVGHA.5500@.TK2MSFTNGP12.phx.gbl...
>I want to built a web page which is gonna have multiple languages. Which
>one is the best way ? Using a Xml file to store languages and their
>corresponding fields or Using a MS-SQL Database ?
> What do you recommend me to have best performance about multilanguage
> web-sites?
>
File I/O is simple and no network operation needed... But again if you are
delpoying to a server, will it be easy to get deployed and get read access
or read-write for the XMLfile?
personally i will go with DB, if your application is already using a
Database for other purposes.. the reason is updating is easy... or else you
have to find ways to deploy the new XML file to the server... might be
painful sometimes..
if you don't have a DB in the app... do a XML file...
VJ
"Savas Ates" <in da club> wrote in message
news:OsYNsoBVGHA.5500@.TK2MSFTNGP12.phx.gbl...
>I want to built a web page which is gonna have multiple languages. Which
>one is the best way ? Using a Xml file to store languages and their
>corresponding fields or Using a MS-SQL Database ?
> What do you recommend me to have best performance about multilanguage
> web-sites?
>
There is a standardized feature in ASP.NET for binding the text properties
of web controls with alternate content, stored in XML based "resource
files", keyed on the language settings of the user's browser.
http://msdn2.microsoft.com/en-us/library/ms227427(VS.80).aspx
"Savas Ates" <in da club> wrote in message
news:OsYNsoBVGHA.5500@.TK2MSFTNGP12.phx.gbl...
>I want to built a web page which is gonna have multiple languages. Which
>one is the best way ? Using a Xml file to store languages and their
>corresponding fields or Using a MS-SQL Database ?
> What do you recommend me to have best performance about multilanguage
> web-sites?
>
Savas,
Is this real a question. Whatever system your choose is the only moment that
it can be from importance be as the user changes the language. As most use
the by IE returned standard information in what is the language and than a
Cookie if that changes, what is a one time operation. For the rest it is
equal to getting all kind of information.
Just my thought,
Cor
On Thu, 30 Mar 2006 20:22:04 +0200, "Cor Ligthert [MVP]"
<notmyfirstname@.planet.nl> wrote:
in <Okh2caCVGHA.5580@.TK2MSFTNGP11.phx.gbl>
>Savas,
>Is this real a question. Whatever system your choose is the only moment tha
t
>it can be from importance be as the user changes the language. As most use
>the by IE returned standard information in what is the language and than a
>Cookie if that changes, what is a one time operation. For the rest it is
>equal to getting all kind of information.
>Just my thought,
>Cor
>
Well, good that we cleared that one up a bit.
This posting is provided "AS IS" with no warranties, no guarantees, and no c
onferred rights.
Stefan Berglund
Yep, clear as mud (as Cor's posts usually are, from memory).
*mike hodgson*
http://sqlnerd.blogspot.com
Stefan Berglund wrote:
>On Thu, 30 Mar 2006 20:22:04 +0200, "Cor Ligthert [MVP]"
><notmyfirstname@.planet.nl> wrote:
> in <Okh2caCVGHA.5580@.TK2MSFTNGP11.phx.gbl>
>
>
>Well, good that we cleared that one up a bit.
>--
>This posting is provided "AS IS" with no warranties, no guarantees, and no
conferred rights.
>Stefan Berglund
>
Performance questions
Got a couple of performance questions.
1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htmHi Dave,
Regarding on the question you mentioned, here are some of my understanding:
1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
==========================
How did you precompile your web application, full mode(non-updatable) or
partial mode(updatable)? For partial precompile, the ASP.NET runtime still
need to do a slim precompile to merge the aspx and the class in the
pregenerated assembly. Also, even if you fully precompile the site, you
should still take the JIT compile into account.
2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
==============================
This seems a bit unexpected. Can you repro the behavior through a very
simple forms authentication secured web project?
3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
============================
..NET framework 2.0 does provide means for you to do redirection between
"Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentioned
the steps to do so:
#Tracing Enhancements in ASP.NET 2.0
http://www.extremeexperts.com/Net/A...sinASPNET2.aspx
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.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/subscript...rt/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi;
1) I use WebDeployment and have it set to "NOT allow to be updatable",
"merge all pages and control outputs to a single assembly", APTCA. Should
this take time to run the first time? And if so, is there a way in IIS to
tell it to load and JIT compile everything?
2) I will try to create a sample.
3) perfect - thanks
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:
Quote:
Originally Posted by
Hi Dave,
>
Regarding on the question you mentioned, here are some of my understanding:
>
1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
==========================
How did you precompile your web application, full mode(non-updatable) or
partial mode(updatable)? For partial precompile, the ASP.NET runtime still
need to do a slim precompile to merge the aspx and the class in the
pregenerated assembly. Also, even if you fully precompile the site, you
should still take the JIT compile into account.
>
>
2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
==============================
This seems a bit unexpected. Can you repro the behavior through a very
simple forms authentication secured web project?
>
>
>
3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
============================
>
.NET framework 2.0 does provide means for you to do redirection between
"Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentioned
the steps to do so:
>
#Tracing Enhancements in ASP.NET 2.0
http://www.extremeexperts.com/Net/A...sinASPNET2.aspx
>
Hope this helps.
>
Sincerely,
>
Steven Cheng
>
Microsoft MSDN Online Support Lead
>
>
>
==================================================
>
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.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/subscript...rt/default.aspx.
>
==================================================
>
>
>
This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
>
>
>
>
>
>
Thanks for your reply Dave,
there is no built-in means to make the entire ASP.NET site JIT compiled,
you may need to programmatically visit all those pages so as to make them
JIT compiled. For the "merge all pages and control outputs to a single
assembly", I dont think this is the cause of the slow performance.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Dave,
Any further progress on this issue? Please feel free to post here if there
is anything else we can help.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Performance questions
Got a couple of performance questions.
1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htmHi Dave,
Regarding on the question you mentioned, here are some of my understanding:
1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
==========================
How did you precompile your web application, full mode(non-updatable) or
partial mode(updatable)? For partial precompile, the ASP.NET runtime still
need to do a slim precompile to merge the aspx and the class in the
pregenerated assembly. Also, even if you fully precompile the site, you
should still take the JIT compile into account.
2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
==============================
This seems a bit unexpected. Can you repro the behavior through a very
simple forms authentication secured web project?
3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
============================
NET framework 2.0 does provide means for you to do redirection between
"Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentioned
the steps to do so:
#Tracing Enhancements in ASP.NET 2.0
http://www.extremeexperts.com/Net/A...sinASPNET2.aspx
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.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/subscript...t/default.aspx.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi;
1) I use WebDeployment and have it set to "NOT allow to be updatable",
"merge all pages and control outputs to a single assembly", APTCA. Should
this take time to run the first time? And if so, is there a way in IIS to
tell it to load and JIT compile everything?
2) I will try to create a sample.
3) perfect - thanks
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:
> Hi Dave,
> Regarding on the question you mentioned, here are some of my understanding
:
> 1) My app is pre-compiled but when I bounce IIS and then go to a page for
> the first time, it takes a couple of seconds to get that page. Subsequent
> hits are fast. Why?
> ==========================
> How did you precompile your web application, full mode(non-updatable) or
> partial mode(updatable)? For partial precompile, the ASP.NET runtime still
> need to do a slim precompile to merge the aspx and the class in the
> pregenerated assembly. Also, even if you fully precompile the site, you
> should still take the JIT compile into account.
>
> 2) Even after hitting all pages involved, if I logout and then go to login
> again - it takes 5 - 10 seconds. The login page uses the standard login
> control and the ASP.NET membership classes so it's not my code at all. Any
> ideas why it's slow?
> ==============================
> This seems a bit unexpected. Can you repro the behavior through a very
> simple forms authentication secured web project?
>
> 3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
> using System.Diagnostics.Trace. This does not show up in the trace.axd
> details at all. How can I get that in there too?
> ============================
> .NET framework 2.0 does provide means for you to do redirection between
> "Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentione
d
> the steps to do so:
> #Tracing Enhancements in ASP.NET 2.0
> l]
> 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
> [url]http://msdn.microsoft.com/subscriptions/support/default.aspx." target="_blank">http://www.extremeexperts.com/Net/A...t/default.aspx.
> ========================================
==========
>
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
>
>
>
>
Thanks for your reply Dave,
there is no built-in means to make the entire ASP.NET site JIT compiled,
you may need to programmatically visit all those pages so as to make them
JIT compiled. For the "merge all pages and control outputs to a single
assembly", I dont think this is the cause of the slow performance.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Dave,
Any further progress on this issue? Please feel free to post here if there
is anything else we can help.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Monday, March 26, 2012
Performance-related questions about an ASP.NET page...
2- Is it better to form your response (HTML page) result from your ASP.NET
page mostly using server side controls, or HTML controls. For example, if
you want to display the word "Welcome" is it better to use an asp:label
control or just type it using a P tag?
Thank you.Sammy:
The table/div issue has nothing to do with ASP.Net...it's more a general
html question...a nice thing about tables is how well they let you structure
data using server-side controls via the Table, TableRow and TableCell
controls. If you do a google search for "Table vs Div" you'll get a lot of
results. The main issue i believe is accessibility...
Your second question is loaded, but i'll answer it as best as possible.
First off, it's pretty obvious that
#1
<p>Hello World</p
is going to be faster than
#2
<Asp:label id="blah" runat="server" />
...
OnPage_Load
blah.text = "hello world"
end sub
in the first example you are simply sending it as plain text to the browser
to render. In the 2nd example, ur doing the same thing, but before that you
are creating an object on the server and doing some other magic.
The real point though is that it shouldn't matter. The debate is purely
speculative...the microsecond (literally) that you'll save in one way
doesn't equate much compared to the flexibility you gain the other. If the
flexiliby isn't, and never will be needed, then do it the first way..
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Sammy" <sammy@.picostation.com> wrote in message
news:%23ySlri1EFHA.1012@.TK2MSFTNGP14.phx.gbl...
> 1- Is it better to use TABLEs or DIVs in an HTML/ASP.NET page? Why?
> 2- Is it better to form your response (HTML page) result from your ASP.NET
> page mostly using server side controls, or HTML controls. For example, if
> you want to display the word "Welcome" is it better to use an asp:label
> control or just type it using a P tag?
> Thank you.
Thank you!
"Karl Seguin" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:ux0CJU2EFHA.1564@.TK2MSFTNGP09.phx.gbl...
> Sammy:
> The table/div issue has nothing to do with ASP.Net...it's more a general
> html question...a nice thing about tables is how well they let you
> structure
> data using server-side controls via the Table, TableRow and TableCell
> controls. If you do a google search for "Table vs Div" you'll get a lot
> of
> results. The main issue i believe is accessibility...
> Your second question is loaded, but i'll answer it as best as possible.
> First off, it's pretty obvious that
> #1
> <p>Hello World</p>
> is going to be faster than
> #2
> <Asp:label id="blah" runat="server" />
> ...
> OnPage_Load
> blah.text = "hello world"
> end sub
> in the first example you are simply sending it as plain text to the
> browser
> to render. In the 2nd example, ur doing the same thing, but before that
> you
> are creating an object on the server and doing some other magic.
> The real point though is that it shouldn't matter. The debate is purely
> speculative...the microsecond (literally) that you'll save in one way
> doesn't equate much compared to the flexibility you gain the other. If
> the
> flexiliby isn't, and never will be needed, then do it the first way..
> Karl
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
> "Sammy" <sammy@.picostation.com> wrote in message
> news:%23ySlri1EFHA.1012@.TK2MSFTNGP14.phx.gbl...
>> 1- Is it better to use TABLEs or DIVs in an HTML/ASP.NET page? Why?
>> 2- Is it better to form your response (HTML page) result from your
>> ASP.NET
>> page mostly using server side controls, or HTML controls. For example, if
>> you want to display the word "Welcome" is it better to use an asp:label
>> control or just type it using a P tag?
>>
>> Thank you.
>>
>>
Performance-related questions about an ASP.NET page...
2- Is it better to form your response (HTML page) result from your ASP.NET
page mostly using server side controls, or HTML controls. For example, if
you want to display the word "Welcome" is it better to use an asp:label
control or just type it using a P tag?
Thank you.Sammy:
The table/div issue has nothing to do with ASP.Net...it's more a general
html question...a nice thing about tables is how well they let you structure
data using server-side controls via the Table, TableRow and TableCell
controls. If you do a google search for "Table vs Div" you'll get a lot of
results. The main issue i believe is accessibility...
Your second question is loaded, but i'll answer it as best as possible.
First off, it's pretty obvious that
#1
<p>Hello World</p>
is going to be faster than
#2
<Asp:label id="blah" runat="server" />
...
OnPage_Load
blah.text = "hello world"
end sub
in the first example you are simply sending it as plain text to the browser
to render. In the 2nd example, ur doing the same thing, but before that you
are creating an object on the server and doing some other magic.
The real point though is that it shouldn't matter. The debate is purely
speculative...the microsecond (literally) that you'll save in one way
doesn't equate much compared to the flexibility you gain the other. If the
flexiliby isn't, and never will be needed, then do it the first way..
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
"Sammy" <sammy@.picostation.com> wrote in message
news:%23ySlri1EFHA.1012@.TK2MSFTNGP14.phx.gbl...
> 1- Is it better to use TABLEs or DIVs in an HTML/ASP.NET page? Why?
> 2- Is it better to form your response (HTML page) result from your ASP.NET
> page mostly using server side controls, or HTML controls. For example, if
> you want to display the word "Welcome" is it better to use an asp:label
> control or just type it using a P tag?
> Thank you.
>
Thank you!
"Karl Seguin" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:ux0CJU2EFHA.1564@.TK2MSFTNGP09.phx.gbl...
> Sammy:
> The table/div issue has nothing to do with ASP.Net...it's more a general
> html question...a nice thing about tables is how well they let you
> structure
> data using server-side controls via the Table, TableRow and TableCell
> controls. If you do a google search for "Table vs Div" you'll get a lot
> of
> results. The main issue i believe is accessibility...
> Your second question is loaded, but i'll answer it as best as possible.
> First off, it's pretty obvious that
> #1
> <p>Hello World</p>
> is going to be faster than
> #2
> <Asp:label id="blah" runat="server" />
> ...
> OnPage_Load
> blah.text = "hello world"
> end sub
> in the first example you are simply sending it as plain text to the
> browser
> to render. In the 2nd example, ur doing the same thing, but before that
> you
> are creating an object on the server and doing some other magic.
> The real point though is that it shouldn't matter. The debate is purely
> speculative...the microsecond (literally) that you'll save in one way
> doesn't equate much compared to the flexibility you gain the other. If
> the
> flexiliby isn't, and never will be needed, then do it the first way..
> Karl
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
> "Sammy" <sammy@.picostation.com> wrote in message
> news:%23ySlri1EFHA.1012@.TK2MSFTNGP14.phx.gbl...
>
Performing MATH on database query results
Hello,
I have an page that is doing a query on a database and returning the results to the screen. The end result I need is that the page will send an email that has two columns, one for element name, and one for the calculated percentage. Essentially, I have the following...
I get a list of records that contain a timedate value and a value of trur or false in a col called 'value' These are up/down alerts for various servers(elements) I need to calculate to 4 decimal places, the amount of uptime for the reported time period and send that out via email. Can anyone help? Thanks!!!
Joe
Hi Joe,
I'm not sure we have enough information, but assuming that true is up and false is down, you could do a
SELECT COUNT(*) FROM theTable WHERE theDate between(date1 AND date2) AND Value = true
...(or 1, in some DBs). By the way, Value is probably not a good field name -- reserved words should never be used to name database objects -- but that's another issue.
Once you have a count of the true records and a count of the false records, it's easy to take those two numbers and divide the true number by the sum of the true and false checks. That's your percentage, though you can't make it accurate to 4 decimal places unless you have a big enough number (at least a hundred thousand "up" values).
Saturday, March 24, 2012
Permission denied creating directory
I have a created a simple file upload asp.net web page which also creates di
rectories on the fly using the following code:
string fullpath = Server.MapPath(".\\..\\..\\" + path);
DirectoryInfo dir = new DirectoryInfo(fullpath);
if(!dir.Exists)
dir.Create();
Now the dir.Create() statement gives me a permission denied. The ASP.NET use
r has been giving full control to the directory and in IIS Admin the directo
ry has write permissions for scripts set. There is no problem in uploading t
he file to an already creat
ed directory which I find extremely weird!
What goes wrong ?
My OS is Windows XP using .NET framework 1.1. All the latest security patche
s are installed.Hi,
Does the "System" account have access?
Cheers,
Phil Winstanley
Microsoft ASP.NET MVP
http://www.myservicescentral.com
Hi Christoffer:
One way to trouble shoot these types of problems is to enable auditing
and find out "who" is getting the access denied message.
See:
http://www.pluralsight.com/keith/bo...leauditing.html
and
http://www.pluralsight.com/keith/bo...fileaccess.html
Also, make sure the permissions apply to subfolders - click "Advanced"
and check the "Apply To" column.
HTH,
Scott
http://www.OdeToCode.com
On Mon, 21 Jun 2004 08:25:40 -0700, Christoffer Srensen
<ChristofferSrensen@.discussions.microsoft.com> wrote:
>Hi,
>I have a created a simple file upload asp.net web page which also creates d
irectories on the fly using the following code:
>string fullpath = Server.MapPath(".\\..\\..\\" + path);
>DirectoryInfo dir = new DirectoryInfo(fullpath);
>if(!dir.Exists)
> dir.Create();
>Now the dir.Create() statement gives me a permission denied. The ASP.NET user has b
een giving full control to the directory and in IIS Admin the directory has write pe
rmissions for scripts set. There is no problem in uploading the file to an already c
rea
ted directory which I find extremely weird!
>What goes wrong ?
>My OS is Windows XP using .NET framework 1.1. All the latest security patches are i
nstalled.
"Scott Allen" wrote:
> One way to trouble shoot these types of problems is to enable auditing
> and find out "who" is getting the access denied message.
> See:
> http://www.pluralsight.com/keith/bo...leauditing.html
> and
> http://www.pluralsight.com/keith/bo...fileaccess.html
Thanks for these links.
> Also, make sure the permissions apply to subfolders - click "Advanced"
> and check the "Apply To" column.
I have found what the problem was. The ASPNET user I added was from another
domain. Now I have added the local ASPNET user and it works.
The audit thing really helped. Thank you very much!
Kind regards,
Christoffer S?rensen
Permission denied creating directory
I have a created a simple file upload asp.net web page which also creates directories on the fly using the following code:
string fullpath = Server.MapPath(".\\..\\..\\" + path);
DirectoryInfo dir = new DirectoryInfo(fullpath);
if(!dir.Exists)
dir.Create();
Now the dir.Create() statement gives me a permission denied. The ASP.NET user has been giving full control to the directory and in IIS Admin the directory has write permissions for scripts set. There is no problem in uploading the file to an already created directory which I find extremely weird!
What goes wrong ?
My OS is Windows XP using .NET framework 1.1. All the latest security patches are installed.Hi Christoffer:
One way to trouble shoot these types of problems is to enable auditing
and find out "who" is getting the access denied message.
See:
http://www.pluralsight.com/keith/bo...leauditing.html
and
http://www.pluralsight.com/keith/bo...fileaccess.html
Also, make sure the permissions apply to subfolders - click "Advanced"
and check the "Apply To" column.
HTH,
--
Scott
http://www.OdeToCode.com
On Mon, 21 Jun 2004 08:25:40 -0700, Christoffer Srensen
<ChristofferSrensen@.discussions.microsoft.com> wrote:
>Hi,
>I have a created a simple file upload asp.net web page which also creates directories on the fly using the following code:
>string fullpath = Server.MapPath(".\\..\\..\\" + path);
>DirectoryInfo dir = new DirectoryInfo(fullpath);
>if(!dir.Exists)
> dir.Create();
>Now the dir.Create() statement gives me a permission denied. The ASP.NET user has been giving full control to the directory and in IIS Admin the directory has write permissions for scripts set. There is no problem in uploading the file to an already created directory which I find extremely weird!
>What goes wrong ?
>My OS is Windows XP using .NET framework 1.1. All the latest security patches are installed.
"Scott Allen" wrote:
> One way to trouble shoot these types of problems is to enable auditing
> and find out "who" is getting the access denied message.
> See:
> http://www.pluralsight.com/keith/bo...leauditing.html
> and
> http://www.pluralsight.com/keith/bo...fileaccess.html
Thanks for these links.
> Also, make sure the permissions apply to subfolders - click "Advanced"
> and check the "Apply To" column.
I have found what the problem was. The ASPNET user I added was from another domain. Now I have added the local ASPNET user and it works.
The audit thing really helped. Thank you very much!
Kind regards,
Christoffer S?rensen
Permission denied problem. please help me
I am trying to download the file from network machine (under same domain). I
am using below link page code to impersonate.
http://www.netomatix.com/ImpersonateUser.aspx
I can able to impersonate the user, when i try to download the file, its
says "unknown user name and password". I given full permission to domain
user. but the same time when i provied the user name and deails on webconfig
file like below, its allowing me to download.
<identity impersonate="true" userName="mydomain\bala" password="password" /
I dont know where the problem is. Can anyone please give me idea to resolve
this.
I am trying to fix this problem past 3 days.
below is the complete code i am using...
i am getting error on response.writefile. This is the error message
Logon failure: unknown user name or bad password.
exception Details: System.IO.IOException: Logon failure: unknown user name
or bad password.
code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim impContext As WindowsImpersonationContext = Nothing
Try
impContext = NetworkSecurity.ImpersonateUser("mydomain",
"bala", "password", LogonType.LOGON32_LOGON_NETWORK,
LogonProvider.LOGON32_PROVIDER_DEFAULT)
Catch ex As ApplicationException
impContext.Undo()
Response.Write(ex.Message)
End Try
If Not (Nothing Is impContext) Then
Try
Catch ex As Exception
Response.Write(ex.Message)
Finally
impContext.Undo()
If Page.IsPostBack Then
Dim spath As String
spath = "\\laptop02\temp\test.pdf"
'DownloadFile(spath, True)
Dim path1 As String = spath
Dim name As String = Path.GetFileName(path1)
Dim ext As String = Path.GetExtension(path1)
Dim type As String = ""
If Not (ext Is Nothing) Then
Select Case ext.ToLower
Case ".htm", ".html"
type = "text/HTML"
' break
Case ".txt"
type = "text/plain"
' break
Case ".doc", ".rtf"
type = "Application/msword"
' break
Case ".pdf"
type = "Application/pdf"
End Select
End If
'If forceDownload Then
Response.AppendHeader("content-disposition",
"attachment; filename = " & name)
'End If
If Not (type = "") Then
Response.ContentType = type
End If
Response.WriteFile(path1)
Response.End()
End If
End Try
End If
End Sub
thanks
balaImpersonation only allows access to local resources as the user who's using
your site. You want delegation which will allow off-host access as the user
who has authenticated in the browser. In essence it means you need to enable
this in AD for the machine that's running your webserver. Check out this
for more info:
http://pluralsite.com/wiki/default...Delegation.html
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hi All,
> I am trying to download the file from network machine (under same
> domain). I am using below link page code to impersonate.
> http://www.netomatix.com/ImpersonateUser.aspx
> I can able to impersonate the user, when i try to download the file,
> its says "unknown user name and password". I given full permission to
> domain user. but the same time when i provied the user name and deails
> on webconfig file like below, its allowing me to download.
> <identity impersonate="true" userName="mydomain\bala"
> password="password" />
> I dont know where the problem is. Can anyone please give me idea to
> resolve this. I am trying to fix this problem past 3 days.
> below is the complete code i am using...
> i am getting error on response.writefile. This is the error message
> Logon failure: unknown user name or bad password. exception Details:
> System.IO.IOException: Logon failure: unknown user name or bad
> password.
> code:
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> Dim impContext As WindowsImpersonationContext = Nothing
> Try
> impContext =
> NetworkSecurity.ImpersonateUser("mydomain",
> "bala", "password", LogonType.LOGON32_LOGON_NETWORK,
> LogonProvider.LOGON32_PROVIDER_DEFAULT)
> Catch ex As ApplicationException
> impContext.Undo()
> Response.Write(ex.Message)
> End Try
> If Not (Nothing Is impContext) Then
> Try
> Catch ex As Exception
> Response.Write(ex.Message)
> Finally
> impContext.Undo()
> If Page.IsPostBack Then
> Dim spath As String
> spath = "\\laptop02\temp\test.pdf"
> 'DownloadFile(spath, True)
> Dim path1 As String = spath
> Dim name As String = Path.GetFileName(path1)
> Dim ext As String = Path.GetExtension(path1)
> Dim type As String = ""
> If Not (ext Is Nothing) Then
> Select Case ext.ToLower
> Case ".htm", ".html"
> type = "text/HTML"
> ' break
> Case ".txt"
> type = "text/plain"
> ' break
> Case ".doc", ".rtf"
> type = "Application/msword"
> ' break
> Case ".pdf"
> type = "Application/pdf"
> End Select
> End If
> 'If forceDownload Then
> Response.AppendHeader("content-disposition",
> "attachment; filename = " & name)
> 'End If
> If Not (type = "") Then
> Response.ContentType = type
> End If
> Response.WriteFile(path1)
> Response.End()
> End If
> End Try
> End If
> End Sub
> thanks
> bala
Hi Brock,
Thanks for the reply. The user name which i am using is under the same
DOMAIN.
Are you mentioning the same domain user or local user for that machine?
Thanks
bala
"Brock Allen" wrote:
> Impersonation only allows access to local resources as the user who's using
> your site. You want delegation which will allow off-host access as the user
> who has authenticated in the browser. In essence it means you need to enable
> this in AD for the machine that's running your webserver. Check out this
> for more info:
> http://pluralsite.com/wiki/default...Delegation.html
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
> > Hi All,
> > I am trying to download the file from network machine (under same
> > domain). I am using below link page code to impersonate.
> > http://www.netomatix.com/ImpersonateUser.aspx
> > I can able to impersonate the user, when i try to download the file,
> > its says "unknown user name and password". I given full permission to
> > domain user. but the same time when i provied the user name and deails
> > on webconfig file like below, its allowing me to download.
> > <identity impersonate="true" userName="mydomain\bala"
> > password="password" />
> > I dont know where the problem is. Can anyone please give me idea to
> > resolve this. I am trying to fix this problem past 3 days.
> > below is the complete code i am using...
> > i am getting error on response.writefile. This is the error message
> > Logon failure: unknown user name or bad password. exception Details:
> > System.IO.IOException: Logon failure: unknown user name or bad
> > password.
> > code:
> > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles Button1.Click
> > Dim impContext As WindowsImpersonationContext = Nothing
> > Try
> > impContext =
> > NetworkSecurity.ImpersonateUser("mydomain",
> > "bala", "password", LogonType.LOGON32_LOGON_NETWORK,
> > LogonProvider.LOGON32_PROVIDER_DEFAULT)
> > Catch ex As ApplicationException
> > impContext.Undo()
> > Response.Write(ex.Message)
> > End Try
> > If Not (Nothing Is impContext) Then
> > Try
> > Catch ex As Exception
> > Response.Write(ex.Message)
> > Finally
> > impContext.Undo()
> > If Page.IsPostBack Then
> > Dim spath As String
> > spath = "\\laptop02\temp\test.pdf"
> > 'DownloadFile(spath, True)
> > Dim path1 As String = spath
> > Dim name As String = Path.GetFileName(path1)
> > Dim ext As String = Path.GetExtension(path1)
> > Dim type As String = ""
> > If Not (ext Is Nothing) Then
> > Select Case ext.ToLower
> > Case ".htm", ".html"
> > type = "text/HTML"
> > ' break
> > Case ".txt"
> > type = "text/plain"
> > ' break
> > Case ".doc", ".rtf"
> > type = "Application/msword"
> > ' break
> > Case ".pdf"
> > type = "Application/pdf"
> > End Select
> > End If
> > 'If forceDownload Then
> > Response.AppendHeader("content-disposition",
> > "attachment; filename = " & name)
> > 'End If
> > If Not (type = "") Then
> > Response.ContentType = type
> > End If
> > Response.WriteFile(path1)
> > Response.End()
> > End If
> > End Try
> > End If
> > End Sub
> > thanks
> > bala
>
>
> Thanks for the reply. The user name which i am using is under the same
> DOMAIN.
Ok, that shouldn't matter with delegation.
> Are you mentioning the same domain user or local user for that
> machine?
For delegation you'll have to be using kerb. The username doesn't matter,
the important thing is to configure the server to be trusted for delegation.
-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi Brock,
Using this below link code i can able to impersonate the user on my domain
user account. From my locl machine IIS i can able to download the other
machine file, like below path.
("AnotherNetworkMachine\temp\ss.pdf")
But when i place this code my server, the impersonate is doing succuss, but
its taking too much time to download and finally it says page cannot be
displayed error.
any idea.
bala
http://west-wind.com/weblog/posts/1572.aspx
"Brock Allen" wrote:
> > Thanks for the reply. The user name which i am using is under the same
> > DOMAIN.
> Ok, that shouldn't matter with delegation.
> > Are you mentioning the same domain user or local user for that
> > machine?
> For delegation you'll have to be using kerb. The username doesn't matter,
> the important thing is to configure the server to be trusted for delegation.
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
Hi Brock,
If i create a local account on webserver and same username and password for
network machine to local, In this point can i able to download the file?
thanks
bala
"Brock Allen" wrote:
> > Thanks for the reply. The user name which i am using is under the same
> > DOMAIN.
> Ok, that shouldn't matter with delegation.
> > Are you mentioning the same domain user or local user for that
> > machine?
> For delegation you'll have to be using kerb. The username doesn't matter,
> the important thing is to configure the server to be trusted for delegation.
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
sorry. when i run the application on same domain its download the file. but
from outside i am getting error. so that wont work.
bala
"Bala" wrote:
> Hi Brock,
> Using this below link code i can able to impersonate the user on my domain
> user account. From my locl machine IIS i can able to download the other
> machine file, like below path.
> ("AnotherNetworkMachine\temp\ss.pdf")
> But when i place this code my server, the impersonate is doing succuss, but
> its taking too much time to download and finally it says page cannot be
> displayed error.
> any idea.
> bala
> http://west-wind.com/weblog/posts/1572.aspx
> "Brock Allen" wrote:
> > > Thanks for the reply. The user name which i am using is under the same
> > > DOMAIN.
> > Ok, that shouldn't matter with delegation.
> > > Are you mentioning the same domain user or local user for that
> > > machine?
> > For delegation you'll have to be using kerb. The username doesn't matter,
> > the important thing is to configure the server to be trusted for delegation.
> > -Brock
> > DevelopMentor
> > http://staff.develop.com/ballen
On Mon, 29 Aug 2005 13:45:32 -0700, "Bala" <Bala@.discussions.microsoft.com> wrote:
Hi Brock,
If i create a local account on webserver and same username and password for
network machine to local, In this point can i able to download the file?
As Brock was indicating, you need to delegate credentials which requires Kerberos if your web
application is configured for Integrated Windows Security.
How to configure an ASP.NET application for a delegation scenario
http://support.microsoft.com/defaul...kb;en-us;810572
Paul
~~~~
Microsoft MVP (Visual Basic)
Permission denied problem. please help me
I am trying to download the file from network machine (under same domain). I
am using below link page code to impersonate.
http://www.netomatix.com/ImpersonateUser.aspx
I can able to impersonate the user, when i try to download the file, its
says "unknown user name and password". I given full permission to domain
user. but the same time when i provied the user name and deails on webconfig
file like below, its allowing me to download.
<identity impersonate="true" userName="mydomain\bala" password="password" />
I dont know where the problem is. Can anyone please give me idea to resolve
this.
I am trying to fix this problem past 3 days.
below is the complete code i am using...
i am getting error on response.writefile. This is the error message
Logon failure: unknown user name or bad password.
exception Details: System.IO.IOException: Logon failure: unknown user name
or bad password.
code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim impContext As WindowsImpersonationContext = Nothing
Try
impContext = NetworkSecurity.ImpersonateUser("mydomain",
"bala", "password", LogonType.LOGON32_LOGON_NETWORK,
LogonProvider.LOGON32_PROVIDER_DEFAULT)
Catch ex As ApplicationException
impContext.Undo()
Response.Write(ex.Message)
End Try
If Not (Nothing Is impContext) Then
Try
Catch ex As Exception
Response.Write(ex.Message)
Finally
impContext.Undo()
If Page.IsPostBack Then
Dim spath As String
spath = "\\laptop02\temp\test.pdf"
'DownloadFile(spath, True)
Dim path1 As String = spath
Dim name As String = Path.GetFileName(path1)
Dim ext As String = Path.GetExtension(path1)
Dim type As String = ""
If Not (ext Is Nothing) Then
Select Case ext.ToLower
Case ".htm", ".html"
type = "text/HTML"
' break
Case ".txt"
type = "text/plain"
' break
Case ".doc", ".rtf"
type = "Application/msword"
' break
Case ".pdf"
type = "Application/pdf"
End Select
End If
'If forceDownload Then
Response.AppendHeader("content-disposition",
"attachment; filename = " & name)
'End If
If Not (type = "") Then
Response.ContentType = type
End If
Response.WriteFile(path1)
Response.End()
End If
End Try
End If
End Sub
thanks
balaImpersonation only allows access to local resources as the user who's using
your site. You want delegation which will allow off-host access as the user
who has authenticated in the browser. In essence it means you need to enable
this in AD for the machine that's running your webserver. Check out this
for more info:
http://pluralsite.com/wiki/default...elop.com/ballen
> Hi All,
> I am trying to download the file from network machine (under same
> domain). I am using below link page code to impersonate.
> http://www.netomatix.com/ImpersonateUser.aspx
> I can able to impersonate the user, when i try to download the file,
> its says "unknown user name and password". I given full permission to
> domain user. but the same time when i provied the user name and deails
> on webconfig file like below, its allowing me to download.
> <identity impersonate="true" userName="mydomain\bala"
> password="password" />
> I dont know where the problem is. Can anyone please give me idea to
> resolve this. I am trying to fix this problem past 3 days.
> below is the complete code i am using...
> i am getting error on response.writefile. This is the error message
> Logon failure: unknown user name or bad password. exception Details:
> System.IO.IOException: Logon failure: unknown user name or bad
> password.
> code:
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> Dim impContext As WindowsImpersonationContext = Nothing
> Try
> impContext =
> NetworkSecurity.ImpersonateUser("mydomain",
> "bala", "password", LogonType.LOGON32_LOGON_NETWORK,
> LogonProvider.LOGON32_PROVIDER_DEFAULT)
> Catch ex As ApplicationException
> impContext.Undo()
> Response.Write(ex.Message)
> End Try
> If Not (Nothing Is impContext) Then
> Try
> Catch ex As Exception
> Response.Write(ex.Message)
> Finally
> impContext.Undo()
> If Page.IsPostBack Then
> Dim spath As String
> spath = "\\laptop02\temp\test.pdf"
> 'DownloadFile(spath, True)
> Dim path1 As String = spath
> Dim name As String = Path.GetFileName(path1)
> Dim ext As String = Path.GetExtension(path1)
> Dim type As String = ""
> If Not (ext Is Nothing) Then
> Select Case ext.ToLower
> Case ".htm", ".html"
> type = "text/HTML"
> ' break
> Case ".txt"
> type = "text/plain"
> ' break
> Case ".doc", ".rtf"
> type = "Application/msword"
> ' break
> Case ".pdf"
> type = "Application/pdf"
> End Select
> End If
> 'If forceDownload Then
> Response.AppendHeader("content-disposition",
> "attachment; filename = " & name)
> 'End If
> If Not (type = "") Then
> Response.ContentType = type
> End If
> Response.WriteFile(path1)
> Response.End()
> End If
> End Try
> End If
> End Sub
> thanks
> bala
Hi Brock,
Thanks for the reply. The user name which i am using is under the same
DOMAIN.
Are you mentioning the same domain user or local user for that machine?
Thanks
bala
"Brock Allen" wrote:
> Impersonation only allows access to local resources as the user who's usin
g
> your site. You want delegation which will allow off-host access as the use
r
> who has authenticated in the browser. In essence it means you need to enab
le
> this in AD for the machine that's running your webserver. Check out this
> for more info:
> http://pluralsite.com/wiki/default...elop.com/ballen
>
>
>
>
> Thanks for the reply. The user name which i am using is under the same
> DOMAIN.
Ok, that shouldn't matter with delegation.
> Are you mentioning the same domain user or local user for that
> machine?
For delegation you'll have to be using kerb. The username doesn't matter,
the important thing is to configure the server to be trusted for delegation.
-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi Brock,
Using this below link code i can able to impersonate the user on my domain
user account. From my locl machine IIS i can able to download the other
machine file, like below path.
("AnotherNetworkMachine\temp\ss.pdf")
But when i place this code my server, the impersonate is doing succuss, but
its taking too much time to download and finally it says page cannot be
displayed error.
any idea.
bala
http://west-wind.com/weblog/posts/1572.aspx
"Brock Allen" wrote:
> Ok, that shouldn't matter with delegation.
>
> For delegation you'll have to be using kerb. The username doesn't matter,
> the important thing is to configure the server to be trusted for delegatio
n.
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
Hi Brock,
If i create a local account on webserver and same username and password for
network machine to local, In this point can i able to download the file?
thanks
bala
"Brock Allen" wrote:
> Ok, that shouldn't matter with delegation.
>
> For delegation you'll have to be using kerb. The username doesn't matter,
> the important thing is to configure the server to be trusted for delegatio
n.
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
sorry. when i run the application on same domain its download the file. but
from outside i am getting error. so that wont work.
bala
"Bala" wrote:
> Hi Brock,
> Using this below link code i can able to impersonate the user on my domain
> user account. From my locl machine IIS i can able to download the other
> machine file, like below path.
> ("AnotherNetworkMachine\temp\ss.pdf")
> But when i place this code my server, the impersonate is doing succuss, bu
t
> its taking too much time to download and finally it says page cannot be
> displayed error.
> any idea.
> bala
> http://west-wind.com/weblog/posts/1572.aspx
> "Brock Allen" wrote:
>
On Mon, 29 Aug 2005 13:45:32 -0700, "Bala" <Bala@.discussions.microsoft.com>
wrote:
Hi Brock,
If i create a local account on webserver and same username and password fo
r
network machine to local, In this point can i able to download the file?
As Brock was indicating, you need to delegate credentials which requires Ker
beros if your web
application is configured for Integrated Windows Security.
How to configure an ASP.NET application for a delegation scenario
http://support.microsoft.com/defaul...kb;en-us;810572
Paul
~~~~
Microsoft MVP (Visual Basic)
permission denied!
i am trying to use xmlHttp.open
while opening page A from a div in page B
i am using .net 2005 and my sites are on the different domains at
server
using the above function causes "permission denied" error
but when page A is on local host it works fine...
i call the function only with 3 parameters:
xmlHttp.open("GET", url ,true)
without username & password (i tried that too ofcourse)
can anyone tell me what's the problem?
thanx
wb
--
wild_bunch
----------------------
Posted via http://www.codecomments.com
----------------------XmlHttpRequest can only open sites in the same domain as the source of
the calling page.
if you need to call another domain, you will need to put a proxy page on
the calling domain.
-- bruce (sqlwork.com)
wild_bunch wrote:
Quote:
Originally Posted by
hi all
>
i am trying to use xmlHttp.open
while opening page A from a div in page B
i am using .net 2005 and my sites are on the different domains at
server
using the above function causes "permission denied" error
but when page A is on local host it works fine...
i call the function only with 3 parameters:
xmlHttp.open("GET", url ,true)
without username & password (i tried that too ofcourse)
can anyone tell me what's the problem?
>
thanx
wb
>
>
>
--
wild_bunch
----------------------
Posted via http://www.codecomments.com
----------------------
>
permission denied!
i am trying to use xmlHttp.open
while opening page A from a div in page B
i am using .net 2005 and my sites are on the different domains at server
using the above function causes "permission denied" error
but when page A is on local host it works fine...
i call the function only with 3 parameters:
xmlHttp.open("GET", url ,true)
without username & password (i tried that too ofcourse)
can anyone tell me what's the problem?
thanx
wb
quote:
Originally posted by wild_bunch
hi all
i am trying to use xmlHttp.open
while opening page A from a div in page B
i am using .net 2005 and my sites are on the different domains at server
using the above function causes "permission denied" error
but when page A is on local host it works fine...
i call the function only with 3 parameters:
xmlHttp.open("GET", url ,true)
without username & password (i tried that too ofcourse)
can anyone tell me what's the problem?
thanx
wb
my mistake its opening page B from a div in page A
XmlHttpRequest can only open sites in the same domain as the source of
the calling page.
if you need to call another domain, you will need to put a proxy page on
the calling domain.
-- bruce (sqlwork.com)
wild_bunch wrote:
> hi all
> i am trying to use xmlHttp.open
> while opening page A from a div in page B
> i am using .net 2005 and my sites are on the different domains at
> server
> using the above function causes "permission denied" error
> but when page A is on local host it works fine...
> i call the function only with 3 parameters:
> xmlHttp.open("GET", url ,true)
> without username & password (i tried that too ofcourse)
> can anyone tell me what's the problem?
> thanx
> wb
>
> --
> wild_bunch
> ---
> Posted via http://www.codecomments.com
> ---
>
quote:
Originally posted by bruce barker
XmlHttpRequest can only open sites in the same domain as the source of
the calling page.
if you need to call another domain, you will need to put a proxy page on
the calling domain.
-- bruce (sqlwork.com)
wild_bunch wrote:
> hi all
> i am trying to use xmlHttp.open
> while opening page A from a div in page B
> i am using .net 2005 and my sites are on the different domains at
> server
> using the above function causes "permission denied" error
> but when page A is on local host it works fine...
> i call the function only with 3 parameters:
> xmlHttp.open("GET", url ,true)
> without username & password (i tried that too ofcourse)
> can anyone tell me what's the problem?
> thanx
> wb
>
> --
> wild_bunch
> ---
> Posted via http://www.codecomments.com
> ---
>
i open another page on the same domain as A
but i still can't reach permission to change a from it although they are on
the same domain...
did i got the wrong idea from what you tried to say to me?
quote:
Originally posted by wild_bunch
i open another page on the same domain as A
but i still can't reach permission to change a from it although they are on
the same domain...
did i got the wrong idea from what you tried to say to me?
oh and by the way i have changed the permissions to max on both sites
also site A must be client side only!
thanx
Permission on a page
Thank Youim not to sure about the absolute correct way to do this
but if you have login you can block people out of it by doing this
web config file
this will not allow any users in who are not logged in
<authorization>
<deny users="?" /> <!-- deny users not logged in -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>
then to allow unauthorized users into a certain page i.e. who are not logged in
this will allow users who arent logged in to page
webform1.aspx - put in bottom of webconfig file
<location path="WebForm1.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
im not sure this is what you are looking for but it might help get you started
Our users will have to log in and that goes against Active Directory. However, only certain users are allowed to a certain page. Is the above the best way to approach this? Does that means that I will have to maintain who has rights through webconfig file and what page they have rights on?
permissions
I have given
ASP.NET MACHINE ACCOUNT and
INTERNET GUEST ACCOUNT
MODIFY
READ AND EXECUTE
LIST FOLDER CONTENTS
READ
WRITE
However, still no luck. Is this a security risk giving these permissions to these accounts? And what do I have to do to get it working!?. Is this because security on win2k3 is tighter? I swear it worked like a charm on win2k
Any help greatly appreciated.
Thanks
Mike123
(Error Below)
Exception Details: System.UnauthorizedAccessException: Access to the path "e:\web\pics\uploads\bob07.jpg" is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired accessso you've made the changes to permisions where? IIS console? You'll also need to alter the NTFS ACLs trhough windows explorer's 'security' pane (under the properties window)
I did that as well , but no luck =[
am i setting the wrong accounts??
Any luck since Mike?
Matt.
Yes I got it.
I believe it was the NT Services account that did not have permission that needed it.
Are you talking about the Windows NT Services, as in the modules which perform functions for Windows NT, or an actual account which I don't appear to have on my system? Where would I look for this?
More importantly, what did you do exactly to get it working?
Thanks muchly,
Matt.
Dont quote me on this but as I remember it an actual account. 2k3 is setup a bit differently. All I did was give this account permissions and it worked.
Wednesday, March 21, 2012
Permissions for website on localhost
s
user control which displays a list of all files in a folder on the client
machine.
When I run the webapp I obviously get an error message saying that the .net
framework wont allow permissions to do such a thing.
Can anyone tell me how I can set permissions on my machine so that I can run
this ?Have you defined the permissions in the IIS website properties?
Thats not the problem.
Its the client. I must set up the .net framework to accept any actions
coming from this URL. It must allow my dll to perform whatever it wants on
the client machine.
It just so happens that its on localhost at the moment.
Start here:
http://msdn.microsoft.com/library/d...esssecurity.asp
I have gone in to the .net configuration manager and set the URL as trusted
but still no joy.
To be honest, I'm not sure if this is even possible--at least, without
extensive work.
ASP.NET code executes on the server, and as such, that is all it has
access to.
In addition, JavaScript is restricted from accessing the file system,
so that rules that out.
The only way I could imagine being able to access the client's file
system is to create an ActiveX control that the clients would have to
download and install, and that code would have to be trusted on the
client machine.
You may be better off to re-evaluate the architecture of your
application--does it really need this functionality? If the answer is
yes, you should probably look into developing a windows forms/smart
client.
What exactly are you trying to do, anyway? Why would a user go to your
website to navigate the files on his local machine?
Permissions for website on localhost
user control which displays a list of all files in a folder on the client
machine.
When I run the webapp I obviously get an error message saying that the .net
framework wont allow permissions to do such a thing.
Can anyone tell me how I can set permissions on my machine so that I can run
this ?Have you defined the permissions in the IIS website properties?
Thats not the problem.
Its the client. I must set up the .net framework to accept any actions
coming from this URL. It must allow my dll to perform whatever it wants on
the client machine.
It just so happens that its on localhost at the moment.
Start here:
http://msdn.microsoft.com/library/d...esssecurity.asp
I have gone in to the .net configuration manager and set the URL as trusted
but still no joy.
To be honest, I'm not sure if this is even possible--at least, without
extensive work.
ASP.NET code executes on the server, and as such, that is all it has
access to.
In addition, JavaScript is restricted from accessing the file system,
so that rules that out.
The only way I could imagine being able to access the client's file
system is to create an ActiveX control that the clients would have to
download and install, and that code would have to be trusted on the
client machine.
You may be better off to re-evaluate the architecture of your
application--does it really need this functionality? If the answer is
yes, you should probably look into developing a windows forms/smart
client.
What exactly are you trying to do, anyway? Why would a user go to your
website to navigate the files on his local machine?
Perplexing Problem
I've got a page that displays a java applet written by an external company (basically displays a mapping application).
I need to be able to take snapshots of these maps and save them in an image format up to the server.
The applets allows me to copy the current view of the map to the clipboard. No problem there - I have coded a button on the form to do this. The button then sends the browser to another page in which I want to save the contents of the clipboard to an image file and upload it to the server.
The Clipboard.GetDataObject returns null however. I guess it's because the image object on the clipboard was not placed there by my ASP.NET app, but by the Java applet.
Does anybody have any idea how I can achieve this?
TIA.I have done a similar type project. Below is the code I used. The clipboard is the clipboard be it from ASP or Java.
Dim data As IDataObject
data = Clipboard.GetDataObject()
Dim bmap As Bitmap
If data.GetDataPresent(GetType(System.Drawing.Bitmap)) Then
Try
bmap = CType(data.GetData(GetType(System.Drawing.Bitmap)), Bitmap)
Catch
Beep()
edSysMessage.Text = "Error capturing photo."
End Try
Else
Beep()
edSysMessage.Text = "No image to capture."
End If
Persist a database connection across postbacks
I'm a new comer to web development as well as asp.net. So when
i fired up my first database driven page, i knew i had a problem of not
having a persistent database connection across postbacks. I tried to
piggyback the connection object to application object and it didn't
work. Well i do know that you ASP.net experts have a default way of
handling this scenario. Please enlighten me.Godwin Burby wrote:
> Hi All,
> I'm a new comer to web development as well as asp.net. So when
> i fired up my first database driven page, i knew i had a problem of not
> having a persistent database connection across postbacks. I tried to
> piggyback the connection object to application object and it didn't
> work. Well i do know that you ASP.net experts have a default way of
> handling this scenario. Please enlighten me.
Just my two-penneth, and may not be the answer you're looking for:
Create a function that creates/sets up your connection. Whenever you
need to interact with the database, call this function, do your data
work, and close the connection. Let the .NET framework worry about
connections and connection pooling.
This may at first sound counterintuitive, and up until a few months
ago, I was going along the route of "create one connection, share it
around, and keep it open". I had a stubborn application that was taking
four hours to perform some processing (admittedly, I was abusing
ASP.NET quite considerably to get this working). I switched around to
opening connections when I needed them, doing the db work, and closing
the connection. The same process then started taking less than ten
minutes.
The Open/Use/Close approach should definitely scale better than either
a) one connection for the whole application, or b) one connection per
session. (a) has problems because you have to do a lot of locking
around every db interaction to make sure no-one else is using it. (b)
can fail if the user opens a second browser window and fires off two db
related tasks simultaneously.
Damien
Hi,
Objects are destroyed every time page is rendered to client browser ..
so you need to create connection again..
One thing you can do is connection pooling but still you need to open a
connection from your application
..
"Godwin Burby" <godwinburby@.gmail.com> wrote in message
news:1142395833.438452.265750@.z34g2000cwc.googlegroups.com...
> Hi All,
> I'm a new comer to web development as well as asp.net. So when
> i fired up my first database driven page, i knew i had a problem of not
> having a persistent database connection across postbacks. I tried to
> piggyback the connection object to application object and it didn't
> work. Well i do know that you ASP.net experts have a default way of
> handling this scenario. Please enlighten me.
>
Thank you Damien for sharing your hardearned knowledge.
Thanx Hussain. I choose to open and close connection each time.
Persist a database connection across postbacks
I'm a new comer to web development as well as asp.net. So when
i fired up my first database driven page, i knew i had a problem of not
having a persistent database connection across postbacks. I tried to
piggyback the connection object to application object and it didn't
work. Well i do know that you ASP.net experts have a default way of
handling this scenario. Please enlighten me.Godwin Burby wrote:
> Hi All,
> I'm a new comer to web development as well as asp.net. So when
> i fired up my first database driven page, i knew i had a problem of not
> having a persistent database connection across postbacks. I tried to
> piggyback the connection object to application object and it didn't
> work. Well i do know that you ASP.net experts have a default way of
> handling this scenario. Please enlighten me.
Just my two-penneth, and may not be the answer you're looking for:
Create a function that creates/sets up your connection. Whenever you
need to interact with the database, call this function, do your data
work, and close the connection. Let the .NET framework worry about
connections and connection pooling.
This may at first sound counterintuitive, and up until a few months
ago, I was going along the route of "create one connection, share it
around, and keep it open". I had a stubborn application that was taking
four hours to perform some processing (admittedly, I was abusing
ASP.NET quite considerably to get this working). I switched around to
opening connections when I needed them, doing the db work, and closing
the connection. The same process then started taking less than ten
minutes.
The Open/Use/Close approach should definitely scale better than either
a) one connection for the whole application, or b) one connection per
session. (a) has problems because you have to do a lot of locking
around every db interaction to make sure no-one else is using it. (b)
can fail if the user opens a second browser window and fires off two db
related tasks simultaneously.
Damien
Hi,
Objects are destroyed every time page is rendered to client browser ..
so you need to create connection again..
One thing you can do is connection pooling but still you need to open a
connection from your application
...
"Godwin Burby" <godwinburby@.gmail.com> wrote in message
news:1142395833.438452.265750@.z34g2000cwc.googlegr oups.com...
> Hi All,
> I'm a new comer to web development as well as asp.net. So when
> i fired up my first database driven page, i knew i had a problem of not
> having a persistent database connection across postbacks. I tried to
> piggyback the connection object to application object and it didn't
> work. Well i do know that you ASP.net experts have a default way of
> handling this scenario. Please enlighten me.
Thank you Damien for sharing your hardearned knowledge.
Thanx Hussain. I choose to open and close connection each time.
persist Checkbox state in datagrid
i have a datagrid control in a page with checkbox column and paging option.
i selected some checkbox and going to next page or prev page, if i come back to the same page
the checkbox is not checked in that page.
so how to persist that checked item throughout the datagrid?
can any one help me with codingWhen the page is changed the DataGrid is data bound again therefore repopulating everything from the data source. This means any changes made client-side are lost. Save the changes made to the data source before data binding.
DJ