Thursday, March 29, 2012
Performance Testing...
Now I am developing C#.net Web Application. It is almost completed. Now I
want to check performance testing of it. I want...
1) Create 100 user environments, mean 100 users simultaneously request a
same page I want to see response time and load on server.
2) As per my idea we can use test project it has web base test and load test
inbuilt in Microsoft visual studio Whidbey.
Any one has idea about Load test in Microsoft visual studio Whidbey?
BYE.
Samir (Software Developer, Ahmedabad, INDIA).The tool is called Application Center Test and it ships with Visual Studio
.NET Enterprise Architect (2003). With Whidbey (2005), you need to look at
the Team tools (beta 1 refresh or the earlier Community Technical Previews).
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Samir Patel" wrote:
> Hi,
> Now I am developing C#.net Web Application. It is almost completed. Now I
> want to check performance testing of it. I want...
>
> 1) Create 100 user environments, mean 100 users simultaneously request a
> same page I want to see response time and load on server.
>
> 2) As per my idea we can use test project it has web base test and load te
st
> inbuilt in Microsoft visual studio Whidbey.
>
> Any one has idea about Load test in Microsoft visual studio Whidbey?
>
> BYE.
> Samir (Software Developer, Ahmedabad, INDIA).
>
>
You should use Microsoft's Web Application Stress Tool (WAST) to stress test
your web application. It can be found at:
http://www.microsoft.com/technet/ar...es.m
spx
Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com
"Samir Patel" <sneelm@.yahoo.co.in> wrote in message
news:eqVEuDalEHA.1152@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Now I am developing C#.net Web Application. It is almost completed. Now I
> want to check performance testing of it. I want...
>
> 1) Create 100 user environments, mean 100 users simultaneously request a
> same page I want to see response time and load on server.
>
> 2) As per my idea we can use test project it has web base test and load
test
> inbuilt in Microsoft visual studio Whidbey.
>
> Any one has idea about Load test in Microsoft visual studio Whidbey?
>
> BYE.
> Samir (Software Developer, Ahmedabad, INDIA).
>
Performance Testing...
Now I am developing C#.net Web Application. It is almost completed. Now I
want to check performance testing of it. I want...
1) Create 100 user environments, mean 100 users simultaneously request a
same page I want to see response time and load on server.
2) As per my idea we can use test project it has web base test and load test
inbuilt in Microsoft visual studio Whidbey.
Any one has idea about Load test in Microsoft visual studio Whidbey?
BYE.
Samir (Software Developer, Ahmedabad, INDIA).You should use Microsoft's Web Application Stress Tool (WAST) to stress test
your web application. It can be found at:
http://www.microsoft.com/technet/ar...s/webstres.mspx
--
Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com
"Samir Patel" <sneelm@.yahoo.co.in> wrote in message
news:eqVEuDalEHA.1152@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Now I am developing C#.net Web Application. It is almost completed. Now I
> want to check performance testing of it. I want...
>
> 1) Create 100 user environments, mean 100 users simultaneously request a
> same page I want to see response time and load on server.
>
> 2) As per my idea we can use test project it has web base test and load
test
> inbuilt in Microsoft visual studio Whidbey.
>
> Any one has idea about Load test in Microsoft visual studio Whidbey?
>
> BYE.
> Samir (Software Developer, Ahmedabad, INDIA).
Monday, March 26, 2012
Performance tuning ASP.NET applications
Some users are experiencing major performance issues during the save process. I'm looking for any pointers to articles on the web which can help me analyze/determine where the bottlenecks are in the entire process, i.e. is it a client problem, IIS problem or SQL Server problem.
Any help on how to do this would be greatly appreciated!
Thanks!!
Here's a few online resources related to ASP.NET performance:
ASP.NET Performance Overview
Improving ASP.NET Performance
ASP.NET Performance
Getting Started - Enhancing Web Site Performance with Caching
Optimizing Performance in ASP.NET
Developing High-Performance ASP.NET Applications
Hope these links help.
-- Erik Reitan
ASP.NET User Education
This posting is provided "AS IS" with no warranties, and confers no rights.
Om Sri Sai Ram
Performance :
http://msdn.microsoft.com/practices/compcat/default.aspx?pull=/library/en-us/dnpag/html/scalenet.asp
Caching:
http://msdn.microsoft.com/practices/compcat/default.aspx?pull=/library/en-us/dnbda/html/cachingarch.asp
Thanks,
Ram
Performing a download along with another action
1. Delete a record from a database
2. Let the user download a text file that is generated
3. Refresh the page to show that the record was deleted
I am able to do any of these things separately with no trouble. The problem
occurs when I try to offer a download AND call my refresh method. When I try
to do a download and call my refresh method, only the download is performed,
regardless of whether the refresh is called before or after the download.
Here is snippet of my code that does the download and refresh:
Me.RefreshEvents()
Response.ClearContent()
Response.ContentType = "text/plain"
Response.AddHeader("content-disposition", "attachment;filename=" &
downloadname)
Response.Write(downloadtext)
Response.End()
If I comment out five lines that do the download, Me.RefreshEvents() does
what I want and would expect, but otherwise it appears to do nothing. I
don't care whether Me.RefreshEvents() is called before or after doing the
download, as long as they are both done. What can I do to make sure both of
these tasks get completed?
--
Nathan Sokalski
njsokalski@dotnet.itags.org.hotmail.com
http://www.nathansokalski.com/when the browser requests a page (like when the user hit the button), the
browser only expects one document back. you can do one of several options
1) refesh page and enable a download button
2) refresh page and use client script to start a download
3) refresh page and use meta tag to start download
in all cases you refresh the page and then download the text file.
-- bruce (sqlwork.com)
"Nathan Sokalski" <njsokalski@.hotmail.com> wrote in message
news:OluwItk6FHA.2176@.TK2MSFTNGP14.phx.gbl...
>I have a webform that contains a button which I want to do three things:
> 1. Delete a record from a database
> 2. Let the user download a text file that is generated
> 3. Refresh the page to show that the record was deleted
> I am able to do any of these things separately with no trouble. The
> problem occurs when I try to offer a download AND call my refresh method.
> When I try to do a download and call my refresh method, only the download
> is performed, regardless of whether the refresh is called before or after
> the download. Here is snippet of my code that does the download and
> refresh:
>
> Me.RefreshEvents()
> Response.ClearContent()
> Response.ContentType = "text/plain"
> Response.AddHeader("content-disposition", "attachment;filename=" &
> downloadname)
> Response.Write(downloadtext)
> Response.End()
>
> If I comment out five lines that do the download, Me.RefreshEvents() does
> what I want and would expect, but otherwise it appears to do nothing. I
> don't care whether Me.RefreshEvents() is called before or after doing the
> download, as long as they are both done. What can I do to make sure both
> of these tasks get completed?
> --
> Nathan Sokalski
> njsokalski@.hotmail.com
> http://www.nathansokalski.com/
This can be done. What is meant by refreshing the page, something like
re-display the grid?
So the user hits the button:
1. You delete the record and re-bind the grid so the user can see the
changes on this page.
2. You save the text to be downloaded in a session variable - this is the
simplest, or on disk, or database record, etc.
3. You have a Protected string variable, say MustDownLoad, and set it's
value "Yes", or anything, to be read by Java script.
4. In the HTML view of the form, right at the bottom, you must add Java
script to open a new window to download the text:
<script language="javascript">
if ("<%=MustDownLoad%>" != "") {
window.open("Form_DownLoadText.aspx");
}
</script>
5. You create a new form Form_DownLoadText.aspx and in it, you read the text
from the session variable/disk/record and do the
Response.ClearContent()
Response.ContentType = "text/plain"
yada yada
"Nathan Sokalski" <njsokalski@.hotmail.com> wrote in message
news:OluwItk6FHA.2176@.TK2MSFTNGP14.phx.gbl...
>I have a webform that contains a button which I want to do three things:
> 1. Delete a record from a database
> 2. Let the user download a text file that is generated
> 3. Refresh the page to show that the record was deleted
> I am able to do any of these things separately with no trouble. The
> problem occurs when I try to offer a download AND call my refresh method.
> When I try to do a download and call my refresh method, only the download
> is performed, regardless of whether the refresh is called before or after
> the download. Here is snippet of my code that does the download and
> refresh:
>
> Me.RefreshEvents()
> Response.ClearContent()
> Response.ContentType = "text/plain"
> Response.AddHeader("content-disposition", "attachment;filename=" &
> downloadname)
> Response.Write(downloadtext)
> Response.End()
>
> If I comment out five lines that do the download, Me.RefreshEvents() does
> what I want and would expect, but otherwise it appears to do nothing. I
> don't care whether Me.RefreshEvents() is called before or after doing the
> download, as long as they are both done. What can I do to make sure both
> of these tasks get completed?
> --
> Nathan Sokalski
> njsokalski@.hotmail.com
> http://www.nathansokalski.com/
Nathan,
Maybe a stupid question, why do you not use the HTML command File Field. It
is a strange name because AFAIK mostly is used Download Button.
It is the HTML tag <Input type=file
Cor
Performing a download along with another action
1. Delete a record from a database
2. Let the user download a text file that is generated
3. Refresh the page to show that the record was deleted
I am able to do any of these things separately with no trouble. The problem
occurs when I try to offer a download AND call my refresh method. When I try
to do a download and call my refresh method, only the download is performed,
regardless of whether the refresh is called before or after the download.
Here is snippet of my code that does the download and refresh:
Me.RefreshEvents()
Response.ClearContent()
Response.ContentType = "text/plain"
Response.AddHeader("content-disposition", "attachment;filename=" &
downloadname)
Response.Write(downloadtext)
Response.End()
If I comment out five lines that do the download, Me.RefreshEvents() does
what I want and would expect, but otherwise it appears to do nothing. I
don't care whether Me.RefreshEvents() is called before or after doing the
download, as long as they are both done. What can I do to make sure both of
these tasks get completed?
--
Nathan Sokalski
njsokalski@dotnet.itags.org.hotmail.com
http://www.nathansokalski.com/when the browser requests a page (like when the user hit the button), the
browser only expects one document back. you can do one of several options
1) refesh page and enable a download button
2) refresh page and use client script to start a download
3) refresh page and use meta tag to start download
in all cases you refresh the page and then download the text file.
-- bruce (sqlwork.com)
"Nathan Sokalski" <njsokalski@.hotmail.com> wrote in message
news:OluwItk6FHA.2176@.TK2MSFTNGP14.phx.gbl...
>I have a webform that contains a button which I want to do three things:
> 1. Delete a record from a database
> 2. Let the user download a text file that is generated
> 3. Refresh the page to show that the record was deleted
> I am able to do any of these things separately with no trouble. The
> problem occurs when I try to offer a download AND call my refresh method.
> When I try to do a download and call my refresh method, only the download
> is performed, regardless of whether the refresh is called before or after
> the download. Here is snippet of my code that does the download and
> refresh:
>
> Me.RefreshEvents()
> Response.ClearContent()
> Response.ContentType = "text/plain"
> Response.AddHeader("content-disposition", "attachment;filename=" &
> downloadname)
> Response.Write(downloadtext)
> Response.End()
>
> If I comment out five lines that do the download, Me.RefreshEvents() does
> what I want and would expect, but otherwise it appears to do nothing. I
> don't care whether Me.RefreshEvents() is called before or after doing the
> download, as long as they are both done. What can I do to make sure both
> of these tasks get completed?
> --
> Nathan Sokalski
> njsokalski@.hotmail.com
> http://www.nathansokalski.com/
>
This can be done. What is meant by refreshing the page, something like
re-display the grid?
So the user hits the button:
1. You delete the record and re-bind the grid so the user can see the
changes on this page.
2. You save the text to be downloaded in a session variable - this is the
simplest, or on disk, or database record, etc.
3. You have a Protected string variable, say MustDownLoad, and set it's
value "Yes", or anything, to be read by Java script.
4. In the HTML view of the form, right at the bottom, you must add Java
script to open a new window to download the text:
<script language="javascript">
if ("<%=MustDownLoad%>" != "") {
window.open("Form_DownLoadText.aspx");
}
</script>
5. You create a new form Form_DownLoadText.aspx and in it, you read the text
from the session variable/disk/record and do the
Response.ClearContent()
Response.ContentType = "text/plain"
yada yada
"Nathan Sokalski" <njsokalski@.hotmail.com> wrote in message
news:OluwItk6FHA.2176@.TK2MSFTNGP14.phx.gbl...
>I have a webform that contains a button which I want to do three things:
> 1. Delete a record from a database
> 2. Let the user download a text file that is generated
> 3. Refresh the page to show that the record was deleted
> I am able to do any of these things separately with no trouble. The
> problem occurs when I try to offer a download AND call my refresh method.
> When I try to do a download and call my refresh method, only the download
> is performed, regardless of whether the refresh is called before or after
> the download. Here is snippet of my code that does the download and
> refresh:
>
> Me.RefreshEvents()
> Response.ClearContent()
> Response.ContentType = "text/plain"
> Response.AddHeader("content-disposition", "attachment;filename=" &
> downloadname)
> Response.Write(downloadtext)
> Response.End()
>
> If I comment out five lines that do the download, Me.RefreshEvents() does
> what I want and would expect, but otherwise it appears to do nothing. I
> don't care whether Me.RefreshEvents() is called before or after doing the
> download, as long as they are both done. What can I do to make sure both
> of these tasks get completed?
> --
> Nathan Sokalski
> njsokalski@.hotmail.com
> http://www.nathansokalski.com/
>
Nathan,
Maybe a stupid question, why do you not use the HTML command File Field. It
is a strange name because AFAIK mostly is used Download Button.
It is the HTML tag <Input type=file>
Cor
perhaps a simple question
i have a problem.
I have a textbox and a button and a link in my application. When the user clicks the button, the text of the textbox is inserted in my table northwind.
After this is done succesful i want to display a messagebox. After searching in the groups i did this.
Button1_Click(......)
{
--entry in northwind--
string alertscript= "<script language= JavaScript>alert('Succefull inserted');</script>";
if(!IsClientScriptBlockRegistered("alert"))
{
this.RegisterClientScriptBlock("alert", alertscript);
}
}
It works good. But when i click now on the link to another page and then after that click the backbutton in the IE6 to my first page, then the messageBox pops up again. I don`t know why this is done. Is the script still registered ? Please help me? I need to stop this.
Thankswhen you hit your back button, your going back to a cached copy of the page which still has the script in it.
personally, i wouldnt use an alert. Id put a Label/Literal control on the page and then upon successfully inserting a db record, you can set the Text of that control and make it visible.
When the user hits their back button, they still see the old message, but it's not in the way...
'permanent' web site url while browsing?
Does anyone know of a way to keep a permanent url throughout a user's
browsing?
For example, if my web site's address is http://www.mysite.com,
I have noticed that some sites keep that url 'permanent' somehow,
i.e. doesn't change while e.g. clicking on a link!
How is this accomplished? Maybe some sort of script?
Thanks in advance!use a frame.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"patrickdrd" <patrickdrd@.discussions.microsoft.comwrote in message
news:FDA51396-2304-4098-9A24-2AB478A8EF88@.microsoft.com...
Quote:
Originally Posted by
Hi all!
>
Does anyone know of a way to keep a permanent url throughout a user's
browsing?
>
For example, if my web site's address is http://www.mysite.com,
I have noticed that some sites keep that url 'permanent' somehow,
i.e. doesn't change while e.g. clicking on a link!
>
How is this accomplished? Maybe some sort of script?
>
Thanks in advance!
No, I don't like frames,
something else?
Hi,
patrickdrd wrote:
Quote:
Originally Posted by
No, I don't like frames,
something else?
Apart from frames of iframes, there are no alternatives using standard
HTML / JavaScript. Even when using URL rewriting, you still need to
provide a unique URL to the server.
Other solutions could be using WPF, Flash or any other type of plug-in.
In these cases, the navigation is not handled by the browser anymore,
but by the plug-in itself.
HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Even when using URL rewriting, you still need to
Quote:
Originally Posted by
provide a unique URL to the server.
I don't care about the server,
I care about what the client can see,
will the client realize the same url by that?
Hi,
patrickdrd wrote:
Quote:
Originally Posted by
Quote:
Originally Posted by
>Even when using URL rewriting, you still need to
>provide a unique URL to the server.
>
I don't care about the server,
I care about what the client can see,
will the client realize the same url by that?
Maybe you don't, but the web browser does care.
It's not possible, except by the solutions already provided to you.
Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
no
use forms.
So if the user clicks the biteme button, the page shows the biteme stuff.
if the user clicks the bitemybubbles button the page shows the bitemybubbles
stuff
same url the whole time
this is usually done one of 2 way:
1) site frameset
2) model-view-controller pattern (site is just one page)
-- bruce (sqlwork.com)
patrickdrd wrote:
Quote:
Originally Posted by
Hi all!
>
Does anyone know of a way to keep a permanent url throughout a user's
browsing?
>
For example, if my web site's address is http://www.mysite.com,
I have noticed that some sites keep that url 'permanent' somehow,
i.e. doesn't change while e.g. clicking on a link!
>
How is this accomplished? Maybe some sort of script?
>
Thanks in advance!
What about Server.Transfer?
Keep transferring the user to another page. The server knows, the client
doesn't.
This is (kinda) similar to proper MVC, which .NET doesn't really do that
well, in that the context keeps getting forwared somewhere else to handle
the request and provide the view.
"Laurent Bugnion [MVP]" <galasoft-lb@.bluewin.chwrote in message
news:OQlXfg3WHHA.1180@.TK2MSFTNGP05.phx.gbl...
Quote:
Originally Posted by
Hi,
>
patrickdrd wrote:
Quote:
Originally Posted by
Quote:
Originally Posted by
>>Even when using URL rewriting, you still need to provide a unique URL to
>>the server.
>>
>I don't care about the server,
>I care about what the client can see,
>will the client realize the same url by that?
>
Maybe you don't, but the web browser does care.
>
It's not possible, except by the solutions already provided to you.
>
Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
'permanent' web site url while browsing?
Does anyone know of a way to keep a permanent url throughout a user's
browsing?
For example, if my web site's address is http://www.mysite.com,
I have noticed that some sites keep that url 'permanent' somehow,
i.e. doesn't change while e.g. clicking on a link!
How is this accomplished? Maybe some sort of script?
Thanks in advance!use a frame.
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"patrickdrd" <patrickdrd@.discussions.microsoft.com> wrote in message
news:FDA51396-2304-4098-9A24-2AB478A8EF88@.microsoft.com...
> Hi all!
> Does anyone know of a way to keep a permanent url throughout a user's
> browsing?
> For example, if my web site's address is http://www.mysite.com,
> I have noticed that some sites keep that url 'permanent' somehow,
> i.e. doesn't change while e.g. clicking on a link!
> How is this accomplished? Maybe some sort of script?
> Thanks in advance!
No, I don't like frames,
something else?
Hi,
patrickdrd wrote:
> No, I don't like frames,
> something else?
Apart from frames of iframes, there are no alternatives using standard
HTML / JavaScript. Even when using URL rewriting, you still need to
provide a unique URL to the server.
Other solutions could be using WPF, Flash or any other type of plug-in.
In these cases, the navigation is not handled by the browser anymore,
but by the plug-in itself.
HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
> Even when using URL rewriting, you still need to
> provide a unique URL to the server.
I don't care about the server,
I care about what the client can see,
will the client realize the same url by that?
Hi,
patrickdrd wrote:
> I don't care about the server,
> I care about what the client can see,
> will the client realize the same url by that?
Maybe you don't, but the web browser does care.
It's not possible, except by the solutions already provided to you.
Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
no
use forms.
So if the user clicks the biteme button, the page shows the biteme stuff.
if the user clicks the bitemybubbles button the page shows the bitemybubbles
stuff
same url the whole time
this is usually done one of 2 way:
1) site frameset
2) model-view-controller pattern (site is just one page)
-- bruce (sqlwork.com)
patrickdrd wrote:
> Hi all!
> Does anyone know of a way to keep a permanent url throughout a user's
> browsing?
> For example, if my web site's address is http://www.mysite.com,
> I have noticed that some sites keep that url 'permanent' somehow,
> i.e. doesn't change while e.g. clicking on a link!
> How is this accomplished? Maybe some sort of script?
> Thanks in advance!
What about Server.Transfer?
Keep transferring the user to another page. The server knows, the client
doesn't.
This is (kinda) similar to proper MVC, which .NET doesn't really do that
well, in that the context keeps getting forwared somewhere else to handle
the request and provide the view.
"Laurent Bugnion [MVP]" <galasoft-lb@.bluewin.ch> wrote in message
news:OQlXfg3WHHA.1180@.TK2MSFTNGP05.phx.gbl...
> Hi,
> patrickdrd wrote:
> Maybe you don't, but the web browser does care.
> It's not possible, except by the solutions already provided to you.
> Greetings,
> Laurent
> --
> Laurent Bugnion [MVP ASP.NET]
> Software engineering, Blog: http://www.galasoft-LB.ch
> PhotoAlbum: http://www.galasoft-LB.ch/pictures
> Support children in Calcutta: http://www.calcutta-espoir.ch
Saturday, March 24, 2012
Permission denied error 2nd Post
Everything is on the same machine
My error is close to the bottom
After reading it today, I can see there is a problem with 2 dbases
'PUBS' and 'Master'
There are also some comments from the group:
--microsoft.public.sqlserver.odbc-- subject: Permission Denied -- Thanks
for help guys
I was able to find a trial version of the Enterprise Manager.
It was suggested to make the post over in dotnet.framework. I am new to
SQL. I can see the following in the MSDE manager:
sql server(my machine name\??SDK)
after I right click on 'PUBS'
--Users/Roles/Public
--public
--machine_name\aspnet
--guest
guest is the only one with 5 check marks going across from left to right for
the following:
Create Table, Create View, Create SP, Create Default, Create Rule
the following 3 are blank:
Create Function, Backup DB, and Backup Log
public has just 1 check mark on
Create SP
machine_name\aspnet is blank from left to right.
CREATE DBASE right is not displayed.
How can I solve my Permission denied error problem?
Thanks for the help,
Taishi
--Comments--
Hi Tashi!
You can ue Enterprise manager to set the rights. Locate the table, and right
click. Select All Tasks, then Manage Permissions. Locate the user that you
are using in your connection object, and then grant the rights. I agree with
Greg that the web user should not normally have that level of permission.
One false move and your server and data could be toast. If you are really
trying to create a table, or attach a database, you should be doing that
through Enterprise Manager, and not the web interface.
Sloan
"Taishi" <taishi_bak@dotnet.itags.org.hotmail.com> wrote in message
news:u54GDcN7DHA.1428@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> How can I check the permissions/rights?
> How can I grant the correct permissions/rights?
> Thanks,
> T
> "Greg Obleshchuk" <greg-n-o-s-p-a-m-@dotnet.itags.org.ag-s-o-f-t-w-a-r-e.com> wrote in
> message news:udfB$CE7DHA.2568@dotnet.itags.org.TK2MSFTNGP10.phx.gbl...
> > Hello,
> > What are you trying to do here? Can you post the commands
> > To create databases you need system administrator rights and dbcreator
> > Permissions (from BOL)
> > CREATE DATABASE permission defaults to members of the sysadmin and
> dbcreator
> > fixed server roles. Members of the sysadmin and securityadmin fixed
server
> > roles can grant CREATE DATABASE permissions to other logins. Members of
> the
> > sysadmin and dbcreator fixed server role can add other logins to the
> > dbcreator role. The CREATE DATABASE permission must be explicitly
granted;
> > it is not granted by the GRANT ALL statement.
> > CREATE DATABASE permission is usually limited to a few logins to
maintain
> > control over disk usage on an instance of SQL Server.
> > I wouldn't suggest granting the owner of a .NET IIS app either of these
> > rights
> > --
> > I hope this helps
> > regards
> > Greg O MCSD
> > http://www.ag-software.com/ags_scribe_index.aspx. SQL Scribe
> Documentation
> > Builder, the quickest way to document your database
> > http://www.ag-software.com/ags_SSEPE_index.aspx. AGS SQL Server
Extended
> > Property Extended properties manager for SQL 2000
> > http://www.ag-software.com/IconExtractionProgram.aspx. Free icon
> extraction
> > program
> > http://www.ag-software.com. Free programming tools
> > "Taishi" <taishi_bak@dotnet.itags.org.hotmail.com> wrote in message
> > news:eJuJfV16DHA.360@dotnet.itags.org.TK2MSFTNGP12.phx.gbl...
> > > Windows Pro
> > > VS.Net
> > > .Net Framework
> > > ASP.NET
> > > My 1st time using Web Forms in .Net
> > > 1st time using SQL
> > > I am receiving the following error:
> > > > System.Data.SqlClient.SqlException: CREATE DATABASE permission denied
in
> > > database 'master'. Could not attach database 'pubs' to file
'D:\Program
> > > Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
> > > > I tried the following:
> > > > Reboot 4-5 times
> > > Share the folder
> > > Web share the folder
> > > > Here is some advanced help from another SQL forum.
> > > sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
> > > isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is
not
> a
> > > command found on my box.
> > > > > Any ideas?
> > > > Thanks for your help,
> > > T
> >You might want to investigate this open source solution:
"ASP Enterprise Manager is a web-based interface for Microsoft SQL Server
and MSDE written using ASP.Net, VB.Net and C#.Net. This project was
developed to allow many SQL Server and MSDE design and administration tasks
to be performed from any computer with a web browser. "
http://www.aspenterprisemanager.com/
http://sourceforge.net/projects/asp-ent-man/
"Taishi" <taishi_bak@.hotmail.com> wrote in message
news:edfyhn97DHA.3860@.tk2msftngp13.phx.gbl...
> New user of SQL
> Everything is on the same machine
> My error is close to the bottom
> After reading it today, I can see there is a problem with 2 dbases
> 'PUBS' and 'Master'
> There are also some comments from the group:
> --microsoft.public.sqlserver.odbc-- subject: Permission Denied -- Thanks
> for help guys
> I was able to find a trial version of the Enterprise Manager.
> It was suggested to make the post over in dotnet.framework. I am new to
> SQL. I can see the following in the MSDE manager:
> sql server(my machine name\??SDK)
> after I right click on 'PUBS'
> --Users/Roles/Public
> --public
> --machine_name\aspnet
> --guest
> guest is the only one with 5 check marks going across from left to right
> for
> the following:
> Create Table, Create View, Create SP, Create Default, Create Rule
> the following 3 are blank:
> Create Function, Backup DB, and Backup Log
> public has just 1 check mark on
> Create SP
> machine_name\aspnet is blank from left to right.
> CREATE DBASE right is not displayed.
> How can I solve my Permission denied error problem?
> Thanks for the help,
> Taishi
>
>
>
> --Comments--
> Hi Tashi!
> You can ue Enterprise manager to set the rights. Locate the table, and
> right
> click. Select All Tasks, then Manage Permissions. Locate the user that you
> are using in your connection object, and then grant the rights. I agree
> with
> Greg that the web user should not normally have that level of permission.
> One false move and your server and data could be toast. If you are really
> trying to create a table, or attach a database, you should be doing that
> through Enterprise Manager, and not the web interface.
> Sloan
> "Taishi" <taishi_bak@.hotmail.com> wrote in message
> news:u54GDcN7DHA.1428@.TK2MSFTNGP12.phx.gbl...
>> How can I check the permissions/rights?
>>
>> How can I grant the correct permissions/rights?
>>
>> Thanks,
>> T
>>
>> "Greg Obleshchuk" <greg-n-o-s-p-a-m-@.ag-s-o-f-t-w-a-r-e.com> wrote in
>> message news:udfB$CE7DHA.2568@.TK2MSFTNGP10.phx.gbl...
>> > Hello,
>> > What are you trying to do here? Can you post the commands
>>> > To create databases you need system administrator rights and dbcreator
>>> > Permissions (from BOL)
>> > CREATE DATABASE permission defaults to members of the sysadmin and
>> dbcreator
>> > fixed server roles. Members of the sysadmin and securityadmin fixed
> server
>> > roles can grant CREATE DATABASE permissions to other logins. Members of
>> the
>> > sysadmin and dbcreator fixed server role can add other logins to the
>> > dbcreator role. The CREATE DATABASE permission must be explicitly
> granted;
>> > it is not granted by the GRANT ALL statement.
>>> > CREATE DATABASE permission is usually limited to a few logins to
> maintain
>> > control over disk usage on an instance of SQL Server.
>>> > I wouldn't suggest granting the owner of a .NET IIS app either of these
>> > rights
>>>> > --
>> > I hope this helps
>> > regards
>> > Greg O MCSD
>> > http://www.ag-software.com/ags_scribe_index.aspx. SQL Scribe
>> Documentation
>> > Builder, the quickest way to document your database
>> > http://www.ag-software.com/ags_SSEPE_index.aspx. AGS SQL Server
> Extended
>> > Property Extended properties manager for SQL 2000
>> > http://www.ag-software.com/IconExtractionProgram.aspx. Free icon
>> extraction
>> > program
>> > http://www.ag-software.com. Free programming tools
>>>>>> > "Taishi" <taishi_bak@.hotmail.com> wrote in message
>> > news:eJuJfV16DHA.360@.TK2MSFTNGP12.phx.gbl...
>> > > Windows Pro
>> > > VS.Net
>> > > .Net Framework
>> > > ASP.NET
>> > > My 1st time using Web Forms in .Net
>> > > 1st time using SQL
>> > > I am receiving the following error:
>> >> > > System.Data.SqlClient.SqlException: CREATE DATABASE permission denied
> in
>> > > database 'master'. Could not attach database 'pubs' to file
> 'D:\Program
>> > > Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
>> >> > > I tried the following:
>> >> > > Reboot 4-5 times
>> > > Share the folder
>> > > Web share the folder
>> >> > > Here is some advanced help from another SQL forum.
>> > > sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
>> > > isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is
> not
>> a
>> > > command found on my box.
>> >> >> > > Any ideas?
>> >> > > Thanks for your help,
>> > > T
>> >> >>>>
>>
Hello! Ken:
I posted that website on my other posting(Permission Denied). I will do
some more research and investigating but you told me that I had to install
it on a ASP.net web server?? I am a uninitiated, so I'm trying to grasp
the concept.
Hi Tashi!
You'll have to install it on a local ASP.net web server, and then use your
browser to go to the site.
Sloan
Taishi
"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> wrote in message
news:u2gF5VD8DHA.2524@.TK2MSFTNGP11.phx.gbl...
> You might want to investigate this open source solution:
>
> "ASP Enterprise Manager is a web-based interface for Microsoft SQL Server
> and MSDE written using ASP.Net, VB.Net and C#.Net. This project was
> developed to allow many SQL Server and MSDE design and administration
tasks
> to be performed from any computer with a web browser. "
> http://www.aspenterprisemanager.com/
> http://sourceforge.net/projects/asp-ent-man/
>
> "Taishi" <taishi_bak@.hotmail.com> wrote in message
> news:edfyhn97DHA.3860@.tk2msftngp13.phx.gbl...
> > New user of SQL
> > Everything is on the same machine
> > My error is close to the bottom
> > After reading it today, I can see there is a problem with 2 dbases
> > 'PUBS' and 'Master'
> > There are also some comments from the group:
> > --microsoft.public.sqlserver.odbc-- subject: Permission Denied --
Thanks
> > for help guys
> > I was able to find a trial version of the Enterprise Manager.
> > It was suggested to make the post over in dotnet.framework. I am new to
> > SQL. I can see the following in the MSDE manager:
> > sql server(my machine name\??SDK)
> > after I right click on 'PUBS'
> > --Users/Roles/Public
> > --public
> > --machine_name\aspnet
> > --guest
> > guest is the only one with 5 check marks going across from left to right
> > for
> > the following:
> > Create Table, Create View, Create SP, Create Default, Create Rule
> > the following 3 are blank:
> > Create Function, Backup DB, and Backup Log
> > public has just 1 check mark on
> > Create SP
> > machine_name\aspnet is blank from left to right.
> > CREATE DBASE right is not displayed.
> > How can I solve my Permission denied error problem?
> > Thanks for the help,
> > Taishi
> > --Comments--
> > Hi Tashi!
> > You can ue Enterprise manager to set the rights. Locate the table, and
> > right
> > click. Select All Tasks, then Manage Permissions. Locate the user that
you
> > are using in your connection object, and then grant the rights. I agree
> > with
> > Greg that the web user should not normally have that level of
permission.
> > One false move and your server and data could be toast. If you are
really
> > trying to create a table, or attach a database, you should be doing that
> > through Enterprise Manager, and not the web interface.
> > Sloan
> > "Taishi" <taishi_bak@.hotmail.com> wrote in message
> > news:u54GDcN7DHA.1428@.TK2MSFTNGP12.phx.gbl...
> >> How can I check the permissions/rights?
> >>
> >> How can I grant the correct permissions/rights?
> >>
> >> Thanks,
> >> T
> >>
> >> "Greg Obleshchuk" <greg-n-o-s-p-a-m-@.ag-s-o-f-t-w-a-r-e.com> wrote in
> >> message news:udfB$CE7DHA.2568@.TK2MSFTNGP10.phx.gbl...
> >> > Hello,
> >> > What are you trying to do here? Can you post the commands
> >> >> > To create databases you need system administrator rights and
dbcreator
> >> >> > Permissions (from BOL)
> >> > CREATE DATABASE permission defaults to members of the sysadmin and
> >> dbcreator
> >> > fixed server roles. Members of the sysadmin and securityadmin fixed
> > server
> >> > roles can grant CREATE DATABASE permissions to other logins. Members
of
> >> the
> >> > sysadmin and dbcreator fixed server role can add other logins to the
> >> > dbcreator role. The CREATE DATABASE permission must be explicitly
> > granted;
> >> > it is not granted by the GRANT ALL statement.
> >> >> > CREATE DATABASE permission is usually limited to a few logins to
> > maintain
> >> > control over disk usage on an instance of SQL Server.
> >> >> > I wouldn't suggest granting the owner of a .NET IIS app either of
these
> >> > rights
> >> >> >> > --
> >> > I hope this helps
> >> > regards
> >> > Greg O MCSD
> >> > http://www.ag-software.com/ags_scribe_index.aspx. SQL Scribe
> >> Documentation
> >> > Builder, the quickest way to document your database
> >> > http://www.ag-software.com/ags_SSEPE_index.aspx. AGS SQL Server
> > Extended
> >> > Property Extended properties manager for SQL 2000
> >> > http://www.ag-software.com/IconExtractionProgram.aspx. Free icon
> >> extraction
> >> > program
> >> > http://www.ag-software.com. Free programming tools
> >> >> >> >> >> > "Taishi" <taishi_bak@.hotmail.com> wrote in message
> >> > news:eJuJfV16DHA.360@.TK2MSFTNGP12.phx.gbl...
> >> > > Windows Pro
> >> > > VS.Net
> >> > > .Net Framework
> >> > > ASP.NET
> >> > > My 1st time using Web Forms in .Net
> >> > > 1st time using SQL
> >> > > I am receiving the following error:
> >> > >> > > System.Data.SqlClient.SqlException: CREATE DATABASE permission
denied
> > in
> >> > > database 'master'. Could not attach database 'pubs' to file
> > 'D:\Program
> >> > > Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
> >> > >> > > I tried the following:
> >> > >> > > Reboot 4-5 times
> >> > > Share the folder
> >> > > Web share the folder
> >> > >> > > Here is some advanced help from another SQL forum.
> >> > > sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
> >> > > isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is
> > not
> >> a
> >> > > command found on my box.
> >> > >> > >> > > Any ideas?
> >> > >> > > Thanks for your help,
> >> > > T
> >> > >> > >> >> >>
> >
Permission Denied Writing to a file
Help.
buzzWow! I hope this server is not exposed to the Internet in any way.
First, you should use NTFS and not FAT32 (there are no permissions on FAT32 disks).
And making ASPNET an administrator is something you should never do. You could edit the machine.config file instead and make the process use SYSTEM instead of ASPNET. I don't even recommend doing this, and you should really just give enough rights on the directories to ASPNET so that you can write to your file.
Does this help?
I'm just in development on my desktop for now, which is why it's FAT32, and the only reason why I made the ASPNET account an admin was to troubleshoot my permission denied error. That's why I mentioned it, because even with it being an admin I'm still getting this error.
You should use NTFS on your dev machines too. I doubt that you will be able to sort this one out except if you use NTFS. I haven't checked this, but I wouldn't be surprised if we used low permissions by default if the file system is Fat, as there are no permissions on this file system.
And 'low permissions' means no write permission, ever, anywhere? That would be remarkably restrictive, wouldn't it? Aren't there some IIS settings I can look at? I also went into my app in IIS and gave write permission in there and that didn't work either.
Thanks for your input.
buzz
Once again, I'm not sure about that at all.
But usually, a web site has no need to write files.
And it would be incredibly dangerous to allow writing to an unprotected file system by default.
I strongly recommend you use NTFS in all circumstances. Fat32 is only there for Win9x compatibility.
I see, well I'll look into converting to NTFS.
>> But usually, a web site has no need to write files.
Is this true? I'm not an expert, but what about uploading files, etc? Also, I want to write to a file for logging purposes, for when my database goes down.
Thanks for all your help!
buzz
Yes, that's why I said "usually".
Most sites don't need to upload files. And if you upload, you should do so in a directory that's not acessible from the web, for obvious security reasons, whenever possible. And you should always require reliable authentication when you allow for it.
Logging can be done using the System.Diagnostics namespace, using the standard Windows event logs.
Wednesday, March 21, 2012
Permissions needed for user to upload file to an App_Data subfolder
subfolder of App_Data to avoid site recompilation each time a file is
uploaded. That worked fine on my development machine, but when I deployed to
a test site at my web host, it fails:
Access to the path '...\App_Data\PDFFiles\Filename.pdf' is denied.
How do I set permissions to allow writing a file into that folder? Is this
something I do in my page or site configuration, or do I need to contact the
web hosting company?This is usually done through the web host or their control panel. IIS is
giving the error because the directory permissions set don't enable the
ASP.Net (or sometimes another account such as Network Services depending
upon the windows server version) user account to write to the directory. So
yes, you'll need to start with the host. There may be an automated way to do
this in the control panel so check there first.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
"Paul Shapiro" <paul@.hideme.broadwayData.com> wrote in message
news:%23PwJ2hmgIHA.4396@.TK2MSFTNGP04.phx.gbl...
>I saw a recent note here that user file uploads should be directed to a
>subfolder of App_Data to avoid site recompilation each time a file is
>uploaded. That worked fine on my development machine, but when I deployed
>to a test site at my web host, it fails:
> Access to the path '...\App_Data\PDFFiles\Filename.pdf' is denied.
> How do I set permissions to allow writing a file into that folder? Is this
> something I do in my page or site configuration, or do I need to contact
> the web hosting company?
Thank you Mark. Folder permissions were not accessible in the web host's
control panel. I sent an email request and they added the permissions for
the web account. It's working now.
"Mark Fitzpatrick" <markfitz@.fitzme.com> wrote in message
news:eopxMJ8gIHA.2448@.TK2MSFTNGP03.phx.gbl...
> This is usually done through the web host or their control panel. IIS is
> giving the error because the directory permissions set don't enable the
> ASP.Net (or sometimes another account such as Network Services depending
> upon the windows server version) user account to write to the directory.
> So yes, you'll need to start with the host. There may be an automated way
> to do this in the control panel so check there first.
> Hope this helps,
> Mark Fitzpatrick
> Microsoft MVP - Expression
> "Paul Shapiro" <paul@.hideme.broadwayData.com> wrote in message
> news:%23PwJ2hmgIHA.4396@.TK2MSFTNGP04.phx.gbl...
Permissions Problem
I have created a facility to allow the user to upload an
image file to the webserver. When the user creates the
image for the first time i.e. the image does not exist
within the directory everything works fine. The problem
occurs if my ASP.NET dll tries to delete the file or
overwrite it?
I assume my app will be using the ASPNET account and I
have ensured that this account has full control over the
directories in question etc.
Anyone any thoughts?
Thanks in advance
AndyWhat is the error?
--
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Andy" <andy@.thecodeclinic.net> wrote in message
news:0e7c01c3b42b$a2d2c020$a501280a@.phx.gbl...
> Hi
> I have created a facility to allow the user to upload an
> image file to the webserver. When the user creates the
> image for the first time i.e. the image does not exist
> within the directory everything works fine. The problem
> occurs if my ASP.NET dll tries to delete the file or
> overwrite it?
> I assume my app will be using the ASPNET account and I
> have ensured that this account has full control over the
> directories in question etc.
> Anyone any thoughts?
> Thanks in advance
> Andy
Whoops!
I have since restarted IIS as well but to no avail??
this is the error generated:-
Source:
CodeClinic.RestWebPort.BusLogic.Image.Save
Exception:
Access to the
path "E:\Inetpub\Poachers\library\dishes\dish_8.jpg" is
denied.
Trace:
at System.IO.__Error.WinIOError(Int32 errorCode,
String str)
at System.IO.FileStream..ctor(String path, FileMode
mode, FileAccess access, FileShare share, Int32
bufferSize, Boolean useAsync, String msgPath, Boolean
bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode
mode)
at System.Web.HttpPostedFile.SaveAs(String filename)
at CodeClinic.RestWebPort.BusLogic.Image.Save(String
file, HtmlInputFile uploadedfile)
>--Original Message--
>What is the error?
>--
>Kevin Spencer
>..Net Developer
>Microsoft MVP
>Big things are made up
>of lots of little things.
>"Andy" <andy@.thecodeclinic.net> wrote in message
>news:0e7c01c3b42b$a2d2c020$a501280a@.phx.gbl...
>> Hi
>>
>> I have created a facility to allow the user to upload
an
>> image file to the webserver. When the user creates the
>> image for the first time i.e. the image does not exist
>> within the directory everything works fine. The problem
>> occurs if my ASP.NET dll tries to delete the file or
>> overwrite it?
>>
>> I assume my app will be using the ASPNET account and I
>> have ensured that this account has full control over
the
>> directories in question etc.
>>
>> Anyone any thoughts?
>>
>> Thanks in advance
>>
>> Andy
>
>.
SORTED!
It seems that under Windows 2003 the process is NOT
running under the ASPNET account but a NETWORK SERVICES
account?
However if this is the case how is it writing the first
file upload successfully to the directory?
weird!
It is now working though, which is nice ;-)
>--Original Message--
>What is the error?
>--
>Kevin Spencer
>..Net Developer
>Microsoft MVP
>Big things are made up
>of lots of little things.
>"Andy" <andy@.thecodeclinic.net> wrote in message
>news:0e7c01c3b42b$a2d2c020$a501280a@.phx.gbl...
>> Hi
>>
>> I have created a facility to allow the user to upload
an
>> image file to the webserver. When the user creates the
>> image for the first time i.e. the image does not exist
>> within the directory everything works fine. The problem
>> occurs if my ASP.NET dll tries to delete the file or
>> overwrite it?
>>
>> I assume my app will be using the ASPNET account and I
>> have ensured that this account has full control over
the
>> directories in question etc.
>>
>> Anyone any thoughts?
>>
>> Thanks in advance
>>
>> Andy
>
>.
There are only 2 possible reasons why your app might be denied access to the
file:
1. It doesn't have the necessary permission
2. The file is in use by an application and locked.
You can easily determine whetyher it's number 2 or not. If you can delete
the file and the app cannot, the problem is number 1. When a file is locked,
even the Administrator group can't delete it.
If the problem is number 1, re-check your permissions. And remember that
Deny permission always overrides Grant. In other words, if you have granted
the user permission, and somewhere else that permission is explicitly
denied, the permission is not granted.
You may also want to make sure that the account you think ASP.Net is running
under is indeed the account it is running under. To do this, just open up
Task Manger, check the Processes tab. The user account under which your
ASP.Net worker process is running will be displayed.
--
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Andy" <andy@.thecodeclinic.net> wrote in message
news:115701c3b431$a6b765a0$a301280a@.phx.gbl...
> Whoops!
> I have since restarted IIS as well but to no avail??
> this is the error generated:-
> Source:
> CodeClinic.RestWebPort.BusLogic.Image.Save
> Exception:
> Access to the
> path "E:\Inetpub\Poachers\library\dishes\dish_8.jpg" is
> denied.
> Trace:
> at System.IO.__Error.WinIOError(Int32 errorCode,
> String str)
> at System.IO.FileStream..ctor(String path, FileMode
> mode, FileAccess access, FileShare share, Int32
> bufferSize, Boolean useAsync, String msgPath, Boolean
> bFromProxy)
> at System.IO.FileStream..ctor(String path, FileMode
> mode)
> at System.Web.HttpPostedFile.SaveAs(String filename)
> at CodeClinic.RestWebPort.BusLogic.Image.Save(String
> file, HtmlInputFile uploadedfile)
>
> >--Original Message--
> >What is the error?
> >--
> >Kevin Spencer
> >..Net Developer
> >Microsoft MVP
> >Big things are made up
> >of lots of little things.
> >"Andy" <andy@.thecodeclinic.net> wrote in message
> >news:0e7c01c3b42b$a2d2c020$a501280a@.phx.gbl...
> >> Hi
> >>
> >> I have created a facility to allow the user to upload
> an
> >> image file to the webserver. When the user creates the
> >> image for the first time i.e. the image does not exist
> >> within the directory everything works fine. The problem
> >> occurs if my ASP.NET dll tries to delete the file or
> >> overwrite it?
> >>
> >> I assume my app will be using the ASPNET account and I
> >> have ensured that this account has full control over
> the
> >> directories in question etc.
> >>
> >> Anyone any thoughts?
> >>
> >> Thanks in advance
> >>
> >> Andy
> >.
Hi Andy,
Thank you for posting to the MSDN newsgroups.
I am glad to know that the problem is resolved. You are right that the
default account is the Network_Service account in Windows 2003 Server (IIS
6). If you want to change the account, please refer to the following
article.
INFO: Implementing Impersonation in an ASP.NET Application
http://support.microsoft.com/defaul...kb;en-us;306158
If you have any more concerns, please feel free to let me know.
Best regards,
Jacob Yang
Microsoft Online Partner Support
Get Secure! C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Thanks guys :-)
>--Original Message--
>Hi Andy,
>Thank you for posting to the MSDN newsgroups.
>I am glad to know that the problem is resolved. You are
right that the
>default account is the Network_Service account in
Windows 2003 Server (IIS
>6). If you want to change the account, please refer to
the following
>article.
>INFO: Implementing Impersonation in an ASP.NET
Application
>http://support.microsoft.com/default.aspx?scid=kb;en-
us;306158
>If you have any more concerns, please feel free to let
me know.
>Best regards,
>Jacob Yang
>Microsoft Online Partner Support
>Get Secure! C www.microsoft.com/security
>This posting is provided "as is" with no warranties and
confers no rights.
>.
permitting linkbutton no validation but other linkbutton validation required
I have 2 linkbuttons.
1st linkbutton (Get) gets values from a database and puts these values into the 3 textboxes.
2nd linkbutton (set) takes the values from the 3 textboxes and puts these values into the database.
The problem is that when I click the Get linkbutton it brings up validation and says required field is empty.
I need it where validation is only on one button and not the other.
can anyone help
Tim CAdd
CausesValidation=False
to any linkbutton that you don't want to trigger validation.
Steve
thank you but I found a different solution. What I did is something like this.
require1.Enabled = False
where require1 is a validator
Friday, March 16, 2012
Persist data in XML data island
on the cleint side. The user should be able to scroll through the
records, modify any or all fields in any or all records, add records,
and delete records.
As far as I can see, there are a couple of ways to implement this. I
could persist the original data island and create a duplicate data
island that the user would modify. When the modifications were
complete, I could post back both XML snippets and compare them to see
what has changed.
Alternatively, I was thinking about using the DiffGram idea, where
each change would add an xml element to an xml snippet that would
indicate what item was changed, added, deleted, etc.
I know that I am not the first person to want to use this type of
technique, so I was hoping that there is something built into the .Net
framework to help with the management of the data. Ideally, I would
like to do something like serialize a dataset to XML, send it to the
client as an XML data island, have them manipulate it, repost it, and
then turn it "magically" into a batch update to the dataset on the
server side. Is that possible, or do I have to roll my own solution?
Thanks.
PatIf you read the XML back into a dataset, then you can use .getchanges on the
datatable to get only the changed rows. Send this back to the server in a
dataset. One easy way to do this is to use web services on the server.
"Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
news:5de67752.0405250947.7f526dc4@.posting.google.c om...
> I want to use an XML data island to display editable records to a user
> on the cleint side. The user should be able to scroll through the
> records, modify any or all fields in any or all records, add records,
> and delete records.
> As far as I can see, there are a couple of ways to implement this. I
> could persist the original data island and create a duplicate data
> island that the user would modify. When the modifications were
> complete, I could post back both XML snippets and compare them to see
> what has changed.
> Alternatively, I was thinking about using the DiffGram idea, where
> each change would add an xml element to an xml snippet that would
> indicate what item was changed, added, deleted, etc.
> I know that I am not the first person to want to use this type of
> technique, so I was hoping that there is something built into the .Net
> framework to help with the management of the data. Ideally, I would
> like to do something like serialize a dataset to XML, send it to the
> client as an XML data island, have them manipulate it, repost it, and
> then turn it "magically" into a batch update to the dataset on the
> server side. Is that possible, or do I have to roll my own solution?
> Thanks.
> Pat
So, I could create a dataset, serialize it and send it down to the
client. Then, on the client side, I could bind it to some controls,
let the user add, delete, and modify records. Then, on repost, I
should convert the data back into a dataset, and call .getchanges? I
don't see how getchanges would work without having the original
dataset to compare the new dataset to?
How could I implement this with web services without posting the
information back to the server for every change?
Pat
"Rick Spiewak" <rickspiewak@.mindspring.com> wrote in message news:<#BJ7SftQEHA.3420@.TK2MSFTNGP11.phx.gbl>...
> If you read the XML back into a dataset, then you can use .getchanges on the
> datatable to get only the changed rows. Send this back to the server in a
> dataset. One easy way to do this is to use web services on the server.
> "Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
> news:5de67752.0405250947.7f526dc4@.posting.google.c om...
> > I want to use an XML data island to display editable records to a user
> > on the cleint side. The user should be able to scroll through the
> > records, modify any or all fields in any or all records, add records,
> > and delete records.
> > As far as I can see, there are a couple of ways to implement this. I
> > could persist the original data island and create a duplicate data
> > island that the user would modify. When the modifications were
> > complete, I could post back both XML snippets and compare them to see
> > what has changed.
> > Alternatively, I was thinking about using the DiffGram idea, where
> > each change would add an xml element to an xml snippet that would
> > indicate what item was changed, added, deleted, etc.
> > I know that I am not the first person to want to use this type of
> > technique, so I was hoping that there is something built into the .Net
> > framework to help with the management of the data. Ideally, I would
> > like to do something like serialize a dataset to XML, send it to the
> > client as an XML data island, have them manipulate it, repost it, and
> > then turn it "magically" into a batch update to the dataset on the
> > server side. Is that possible, or do I have to roll my own solution?
> > Thanks.
> > Pat
Don't bind to the XML, re-create the dataset. Then you can do getchanges
against the modified table, re-create a dataset with just the changes,
and send that back up to the server.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
persist data in the form
button to trigger another asp.net web form for lookup purpose. My problem is
when the user choose data from the lookup form and back to input data, the
data in the input data form was refreshed and become blank. How can I
persist those data in the input data form??
Million thankshttp://msdn.microsoft.com/msdnmag/i...te/default.aspx
"Grey" <erickwyum@.i-cable.com> wrote in message
news:O7xHjuIlEHA.592@.TK2MSFTNGP11.phx.gbl...
> There is a ASP.NET web form for user input data, user can also click one
> button to trigger another asp.net web form for lookup purpose. My problem
is
> when the user choose data from the lookup form and back to input data, the
> data in the input data form was refreshed and become blank. How can I
> persist those data in the input data form??
> Million thanks
persist data in the form
button to trigger another asp.net web form for lookup purpose. My problem is
when the user choose data from the lookup form and back to input data, the
data in the input data form was refreshed and become blank. How can I
persist those data in the input data form'
Million thankshttp://msdn.microsoft.com/msdnmag/i...te/default.aspx
"Grey" <erickwyum@.i-cable.com> wrote in message
news:O7xHjuIlEHA.592@.TK2MSFTNGP11.phx.gbl...
> There is a ASP.NET web form for user input data, user can also click one
> button to trigger another asp.net web form for lookup purpose. My problem
is
> when the user choose data from the lookup form and back to input data, the
> data in the input data form was refreshed and become blank. How can I
> persist those data in the input data form'
> Million thanks
>
Persist data in XML data island
on the cleint side. The user should be able to scroll through the
records, modify any or all fields in any or all records, add records,
and delete records.
As far as I can see, there are a couple of ways to implement this. I
could persist the original data island and create a duplicate data
island that the user would modify. When the modifications were
complete, I could post back both XML snippets and compare them to see
what has changed.
Alternatively, I was thinking about using the DiffGram idea, where
each change would add an xml element to an xml snippet that would
indicate what item was changed, added, deleted, etc.
I know that I am not the first person to want to use this type of
technique, so I was hoping that there is something built into the .Net
framework to help with the management of the data. Ideally, I would
like to do something like serialize a dataset to XML, send it to the
client as an XML data island, have them manipulate it, repost it, and
then turn it "magically" into a batch update to the dataset on the
server side. Is that possible, or do I have to roll my own solution?
Thanks.
PatIf you read the XML back into a dataset, then you can use .getchanges on the
datatable to get only the changed rows. Send this back to the server in a
dataset. One easy way to do this is to use web services on the server.
"Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
news:5de67752.0405250947.7f526dc4@.posting.google.com...
> I want to use an XML data island to display editable records to a user
> on the cleint side. The user should be able to scroll through the
> records, modify any or all fields in any or all records, add records,
> and delete records.
> As far as I can see, there are a couple of ways to implement this. I
> could persist the original data island and create a duplicate data
> island that the user would modify. When the modifications were
> complete, I could post back both XML snippets and compare them to see
> what has changed.
> Alternatively, I was thinking about using the DiffGram idea, where
> each change would add an xml element to an xml snippet that would
> indicate what item was changed, added, deleted, etc.
> I know that I am not the first person to want to use this type of
> technique, so I was hoping that there is something built into the .Net
> framework to help with the management of the data. Ideally, I would
> like to do something like serialize a dataset to XML, send it to the
> client as an XML data island, have them manipulate it, repost it, and
> then turn it "magically" into a batch update to the dataset on the
> server side. Is that possible, or do I have to roll my own solution?
> Thanks.
> Pat
So, I could create a dataset, serialize it and send it down to the
client. Then, on the client side, I could bind it to some controls,
let the user add, delete, and modify records. Then, on repost, I
should convert the data back into a dataset, and call .getchanges? I
don't see how getchanges would work without having the original
dataset to compare the new dataset to?
How could I implement this with web services without posting the
information back to the server for every change?
Pat
"Rick Spiewak" <rickspiewak@.mindspring.com> wrote in message news:<#BJ7SftQEHA.3420@.TK2MSFT
NGP11.phx.gbl>...
> If you read the XML back into a dataset, then you can use .getchanges on t
he
> datatable to get only the changed rows. Send this back to the server in a
> dataset. One easy way to do this is to use web services on the server.
> "Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
> news:5de67752.0405250947.7f526dc4@.posting.google.com...
Don't bind to the XML, re-create the dataset. Then you can do getchanges
against the modified table, re-create a dataset with just the changes,
and send that back up to the server.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
Persist Page Location
o scroll down a little to see them all. Incidentally the last control is a t
able control which allows you to add a new row dynamically upon clicking a l
ink button.
Because link button fires a postback, which is what is needed in order to ad
d the next row to the table it brings the user back to the top of the page a
fterwards.
I want the user to be back where they clicked on the link button at the bott
om of the page. I recall there is a setting or some easy way to do this but
for the life of me can not remember. Any help would be great!
-DemetriOn 8/4/2004 10:45 AM, Demetri wrote:
> I have an aspx page which has many controls. Just enough to cause the user
to scroll down a little to see them all. Incidentally the last control is a
table control which allows you to add a new row dynamically upon clicking a
link button.
> Because link button fires a postback, which is what is needed in order to
add the next row to the table it brings the user back to the top of the page
afterwards.
> I want the user to be back where they clicked on the link button at the bo
ttom of the page. I recall there is a setting or some easy way to do this bu
t for the life of me can not remember. Any help would be great!
>
SmartNavigation was the way to overcome some of this 'page viewing
state' problems in the browser, but I've heard it's buggy.
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Hi Demetri,
Have a look at Scott Guthrie's TechEd 2003 Black Belt Web Forms presentation
(http://www.scottgu.com) he coveres this scenario, under the title
"scrolling and postback".
Hope this helps,
Michael
This posting is provided "AS IS" with no warranties, and confers no rights.
"Demetri" <Demetri@.discussions.microsoft.com> wrote in message
news:54F55A7E-B548-402A-BCF4-1DBFDD5FF9BE@.microsoft.com...
>I have an aspx page which has many controls. Just enough to cause the user
>to scroll down a little to see them all. Incidentally the last control is a
>table control which allows you to add a new row dynamically upon clicking a
>link button.
> Because link button fires a postback, which is what is needed in order to
> add the next row to the table it brings the user back to the top of the
> page afterwards.
> I want the user to be back where they clicked on the link button at the
> bottom of the page. I recall there is a setting or some easy way to do
> this but for the life of me can not remember. Any help would be great!
> --
> -Demetri
Persist object
I'm in need of some brainstormin help!
We have an object that we use in a number of places, both by User Controls
and Pages. This object is loaded everytime we need to use the piece of
functionality.
Example:
The user logs in and the object is loaded, the user then clicks a link to do
a task and again the object is loaded again.
What is the best way to persist the object? Session, cookie etc as it will
be used alot as the user uses the app.
Also, what are people thoughts about this, and it there any patterns that
may help?
Thanks all,
JonJon,
If it is an aspx or html page and is called with the same parameters or
without any parameters, it will be cached on the client side and will open
very fast. You will have to tell us more about the nature of the object to
hear other suggestions.
Eliyahu
"Jon" <Jon@.discussions.microsoft.com> wrote in message
news:7472A3B1-1802-4EB5-8E5D-BAC04F26185D@.microsoft.com...
> Hello all,
> I'm in need of some brainstormin help!
> We have an object that we use in a number of places, both by User Controls
> and Pages. This object is loaded everytime we need to use the piece of
> functionality.
> Example:
> The user logs in and the object is loaded, the user then clicks a link to
do
> a task and again the object is loaded again.
> What is the best way to persist the object? Session, cookie etc as it will
> be used alot as the user uses the app.
> Also, what are people thoughts about this, and it there any patterns that
> may help?
> Thanks all,
> Jon
Some ramblings,
if the object is loaded from server side state then I suggest making
all your pages (and controls?) extend from a base class (that you
create), this class would extend from System.web.UI.Page,
This class could load the object and set a property, which the derived
classes could access.
If the object is not to big then I'd recomend doing this each page
load, caching the object brings in added complexity,
If its a big object (or static for all users) then cache it, use the
session for user based objects and cache for static objects
In my experience though its best to load the object with each page
request
Eliyahu,
The object is data that is a collection class that we loop through to
create a tree (like Windows). This tree is not only used for navigation, but
also used in UserControls to help the user when carrying out some action,
like copying a file, specifying where to place a file etc.
The data help in the collection class rarely changes, but when we use it, we
always reload it and we were just thinking if that would be a performance
drag?
Thanks,
Jon
"Eliyahu Goldin" wrote:
> Jon,
> If it is an aspx or html page and is called with the same parameters or
> without any parameters, it will be cached on the client side and will open
> very fast. You will have to tell us more about the nature of the object to
> hear other suggestions.
> Eliyahu
> "Jon" <Jon@.discussions.microsoft.com> wrote in message
> news:7472A3B1-1802-4EB5-8E5D-BAC04F26185D@.microsoft.com...
> do
>
>
Jon,
If the collection is specific to a user session, the best place is the
session.
If it is application-wide, meaning it is the same for all users, a public
static variable will be good. You can also use application's Cache if you
want to be able to control the way how the object persists.
Eliyahu
"Jon" <Jon@.discussions.microsoft.com> wrote in message
news:1BE9F76D-8B0A-4A21-B65A-54057D8E4BE7@.microsoft.com...
> Eliyahu,
> The object is data that is a collection class that we loop through to
> create a tree (like Windows). This tree is not only used for navigation,
but
> also used in UserControls to help the user when carrying out some action,
> like copying a file, specifying where to place a file etc.
> The data help in the collection class rarely changes, but when we use it,
we
> always reload it and we were just thinking if that would be a performance
> drag?
> Thanks,
> Jon
> "Eliyahu Goldin" wrote:
>
open
to
Controls
to
will
that
Persist object
I'm in need of some brainstormin help!
We have an object that we use in a number of places, both by User Controls
and Pages. This object is loaded everytime we need to use the piece of
functionality.
Example:
The user logs in and the object is loaded, the user then clicks a link to do
a task and again the object is loaded again.
What is the best way to persist the object? Session, cookie etc as it will
be used alot as the user uses the app.
Also, what are people thoughts about this, and it there any patterns that
may help?
Thanks all,
JonJon,
If it is an aspx or html page and is called with the same parameters or
without any parameters, it will be cached on the client side and will open
very fast. You will have to tell us more about the nature of the object to
hear other suggestions.
Eliyahu
"Jon" <Jon@.discussions.microsoft.com> wrote in message
news:7472A3B1-1802-4EB5-8E5D-BAC04F26185D@.microsoft.com...
> Hello all,
> I'm in need of some brainstormin help!
> We have an object that we use in a number of places, both by User Controls
> and Pages. This object is loaded everytime we need to use the piece of
> functionality.
> Example:
> The user logs in and the object is loaded, the user then clicks a link to
do
> a task and again the object is loaded again.
> What is the best way to persist the object? Session, cookie etc as it will
> be used alot as the user uses the app.
> Also, what are people thoughts about this, and it there any patterns that
> may help?
> Thanks all,
> Jon
Some ramblings,
if the object is loaded from server side state then I suggest making
all your pages (and controls?) extend from a base class (that you
create), this class would extend from System.web.UI.Page,
This class could load the object and set a property, which the derived
classes could access.
If the object is not to big then I'd recomend doing this each page
load, caching the object brings in added complexity,
If its a big object (or static for all users) then cache it, use the
session for user based objects and cache for static objects
In my experience though its best to load the object with each page
request
Eliyahu,
The object is data that is a collection class that we loop through to
create a tree (like Windows). This tree is not only used for navigation, but
also used in UserControls to help the user when carrying out some action,
like copying a file, specifying where to place a file etc.
The data help in the collection class rarely changes, but when we use it, we
always reload it and we were just thinking if that would be a performance
drag?
Thanks,
Jon
"Eliyahu Goldin" wrote:
> Jon,
> If it is an aspx or html page and is called with the same parameters or
> without any parameters, it will be cached on the client side and will open
> very fast. You will have to tell us more about the nature of the object to
> hear other suggestions.
> Eliyahu
> "Jon" <Jon@.discussions.microsoft.com> wrote in message
> news:7472A3B1-1802-4EB5-8E5D-BAC04F26185D@.microsoft.com...
> > Hello all,
> > I'm in need of some brainstormin help!
> > We have an object that we use in a number of places, both by User Controls
> > and Pages. This object is loaded everytime we need to use the piece of
> > functionality.
> > Example:
> > The user logs in and the object is loaded, the user then clicks a link to
> do
> > a task and again the object is loaded again.
> > What is the best way to persist the object? Session, cookie etc as it will
> > be used alot as the user uses the app.
> > Also, what are people thoughts about this, and it there any patterns that
> > may help?
> > Thanks all,
> > Jon
>
Jon,
If the collection is specific to a user session, the best place is the
session.
If it is application-wide, meaning it is the same for all users, a public
static variable will be good. You can also use application's Cache if you
want to be able to control the way how the object persists.
Eliyahu
"Jon" <Jon@.discussions.microsoft.com> wrote in message
news:1BE9F76D-8B0A-4A21-B65A-54057D8E4BE7@.microsoft.com...
> Eliyahu,
> The object is data that is a collection class that we loop through to
> create a tree (like Windows). This tree is not only used for navigation,
but
> also used in UserControls to help the user when carrying out some action,
> like copying a file, specifying where to place a file etc.
> The data help in the collection class rarely changes, but when we use it,
we
> always reload it and we were just thinking if that would be a performance
> drag?
> Thanks,
> Jon
> "Eliyahu Goldin" wrote:
> > Jon,
> > If it is an aspx or html page and is called with the same parameters or
> > without any parameters, it will be cached on the client side and will
open
> > very fast. You will have to tell us more about the nature of the object
to
> > hear other suggestions.
> > Eliyahu
> > "Jon" <Jon@.discussions.microsoft.com> wrote in message
> > news:7472A3B1-1802-4EB5-8E5D-BAC04F26185D@.microsoft.com...
> > > Hello all,
> > > > I'm in need of some brainstormin help!
> > > > We have an object that we use in a number of places, both by User
Controls
> > > and Pages. This object is loaded everytime we need to use the piece of
> > > functionality.
> > > > Example:
> > > > The user logs in and the object is loaded, the user then clicks a link
to
> > do
> > > a task and again the object is loaded again.
> > > > What is the best way to persist the object? Session, cookie etc as it
will
> > > be used alot as the user uses the app.
> > > > Also, what are people thoughts about this, and it there any patterns
that
> > > may help?
> > > > Thanks all,
> > > > Jon