|
just check the credentials Put one Home page or any page after login in that check the type of user from database or where you are storing then have if or switch statement check the credentials then just transfer to that page
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
follow the steps
1.create two folders one.Manager and other Staff
2.Put all MAnager related pages in manager folder and all Staff related in staff folder.
3.create two roles.one for manager and other staff.
4.On login check role of the user and redirected to respective page.
5.in web.config file under location tag specify allow roles for each folder.
any problem ?
satyaki mishra
|
|
|
|
|
Hi all,
When i change any file in my project i got the the message as access denied
and i have checked and given the permission for those folders, still i am getting the access denied problem for particular files.But i can add,update and delete new files.I am getting the error for some of the Files only. what is the reason?
and how to solve those problems?
Thanks,
Ramesh A.
|
|
|
|
|
Files should be Read only or in Used.Check out property of file
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
I have checked that one also,the files are not read only.But the files that was added now are working very well and we have given full access to the folder also.But the same error is coming in the online.
|
|
|
|
|
there can be any reasons one of it might be last time when you run your application and closed it i think the process is still runing in back end so go to task manager and stop aspnet_wp.exe and try again .
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I have checked and changed everything in the online. But still the same problem is coming.I have given full write permission to the folders and the individual file also.
|
|
|
|
|
If you have given ASPNET account full permissions and then also it is not working then you might have not closed the file since you updated/write or read it last time through your application.
Check the modes in which you are opening file(ie ReadOnly,Write etc).
Shujaat
|
|
|
|
|
I have checked and changed everything in the online. But still the same problem is coming.I have given full write permission to the folders and the individual file also.
|
|
|
|
|
Might be that some files that you are not able to acces got currupted when you last tried to write or append it. Have you closed the file after reading/writing in your application ? If you show me the code I will be in better position to tell the exact problem.
Shujaat
|
|
|
|
|
Using ASP.Net 2.0 and VS 2005.
One of the GridView columns is a bound HyperLink that sends me to a new aspx page. I bound it's DataText property with some field in the database.when I click this hyperlink it should redirect me to anothr page and also I want to grad the value of first cell in the selected row. How can I do that.
seema
|
|
|
|
|
Use ItemTemplate instead of BoundField and
Use HtmlAnchorTag instead of Hyperlink
Like as
<ItemTemplate>
<a href="Page.aspx?Id=<%#Eval("FirstFieldID")>"><%#Eval("SecondFieldName")></a>
</ItemTemplate>
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
<asp:GridView ID="gvCode" runat="server" AllowPaging="True" AutoGenerateColumns="False" Width="784px" CellPadding="4"CellSpacing="2" font-size="8pt" headerstyle-backcolor="maroon" headerstyle-forecolor="khaki" headerstyle-font-bold="true" rowstyle-verticalalign="top" OnPageIndexChanging="gvCode_PageIndexChanging" style="z-index: 100; left: 9px; position: absolute; top: 18px" >
<Columns>
<asp:HyperLinkField DataNavigateUrlFields="S_LANGUAGE,SEARCH_ID" DataNavigateUrlFormatString="frmCodeInsert.aspx?lid={0}&sid={1}" DataTextField="S_DESC" NavigateUrl="frmCodeInsert.aspx" HeaderText="Description" >
<HeaderStyle CssClass="fontGridHeader" HorizontalAlign="Left" VerticalAlign="Top" />
<ItemStyle CssClass="fontGridItem" />
</asp:HyperLinkField>
</Columns>
<RowStyle VerticalAlign="Top" />
<HeaderStyle BackColor="Maroon" Font-Bold="True" ForeColor="Khaki" />
</asp:GridView>
in the DataNavigateUrlFields property of the hyperlink column you can specify which column value to be taken to next page, the S_LANGUAGE,SEARCH_ID, is the two values i am taking to the next page..
winnie
|
|
|
|
|
when i click a link as "..\xxx.ppt" or "..\xxx.pps" it asks "do you want to open or Save"
but i dont wantto see this message, let it just show the pps.
how could i do?
|
|
|
|
|
//Instantiate a Presentation object that represents a PPT file
Presentation pres=new Presentation();
//....do some work here.....
//Setting the content type of the Http Response
this.Response.ContentType = "application/vnd.ms-powerpoint";
//Appending the header of the Http Response to contain the presentation file name
this.Response.AppendHeader("Content-Disposition", "attachment; filename=demo.ppt");
//Flushing the buffers of Http Response
this.Response.Flush();
//Accessing the output stream of Http Response
System.IO.Stream st = this.Response.OutputStream;
//Saving the presentation to the output stream of Http Response
pres.Write(st);
//Closing the Http Response
this.Response.End();
I didn't get any requirements for the signature
|
|
|
|
|
I'm creating a website that needs to be extremely secure (medical company which must adhere to HIPAA security guidelines). So I'm a little leary about simply placing the names of my stored procedures into the "sqldatasource" control when populating gridviews, listviews, etc. I prefer to do all of that in my codebehind c-sharp page instead. So I'm just wondering if anyone who used the "sqldatasource" control feels there may be security issues with displaying db info on the aspx page.
I remember back in the days of classic ASP 3.0, there were times in which an error occurred on the server in which instead of displaying a web page, all of the asp code was displayed instead. If this were to happen with a sqldatasource control on the page, the viewer would then know way too much info about my database.
In fact I remember a scary incident involving my bank in which their online bank account site was coded in classic asp. One day I logged on and I received an asp error page which pointed out to me the exact location of the error in the asp code. I received 2 errors. 1st, the problem was their connection string. The 2nd problem was 1 of their queries, which were hardcoded into the asp code. So as you can guess, this displayed to me their server name, database name, table names, and table fields (needless to say, I closed my account with them the next day).
So I guess I'm just asking is, is there any security advantage to placing your calls to the database in the codebehind page rather than simply placing it in a sqldatasource control on the actual aspx page?
Thanks.
-Goalie35
|
|
|
|
|
Goalie35 wrote: So I'm a little leary about simply placing the names of my stored procedures into the "sqldatasource" control when populating gridviews, listviews, etc.
Aren't you doing a proper 3-tier architecture with a presentation layer, business objects and data layer. The stored procedure names should be no where near the presentation layer at all.
Goalie35 wrote: I remember back in the days of classic ASP 3.0, there were times in which an error occurred on the server in which instead of displaying a web page, all of the asp code was displayed instead. If this were to happen with a sqldatasource control on the page, the viewer would then know way too much info about my database.
Then use a DAL (Data Absrraction Layer) Here's a start[^]. The series isn't finished but it will get you going in the right direction.
Goalie35 wrote: So I guess I'm just asking is, is there any security advantage to placing your calls to the database in the codebehind page rather than simply placing it in a sqldatasource control on the actual aspx page?
You shouldn't have database code in your codebehind page. Period. Neither on your ASPX file. It should be properly architected to take it as far away from the presentation layer as possible.
|
|
|
|
|
I have a suggestion for you. It will ease your fears and make for a better application. Use Class Objects for all your data. When you want to bind them with a control return a generic list and use the objectdatasource.
Check here for a simple example
I didn't get any requirements for the signature
|
|
|
|
|
I've added a ReportViewer control to my page.
It shows all the icons in Design mode, but when I run the page (even on my PC) no icons show, just red x's.
There is a control property ToolbarImagesFolderUrl, but I don't know where to point it, or why it isn't defaulted at least.
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
I have file Upload control on my page where I need to browse only PDF files but when browse button is clicked it shows *.* where it should be *.pdf, I am checking the file extension on post back as well but need user to view only PDF while browsing. Any Solutions ???
Regards
|
|
|
|
|
Do you want to validate only .PDF file to upload it?
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
if you will read my message again with care you will understand.
I am saying "one click of browse button it shows *.* where I want to show *.pdf files"
Regards
|
|
|
|
|
BTW, I don't know how you are connected to ALM Soft but that is one of the worst web sites I have ever seen. You can practically see that one guy's balls. No one wants to see that.
I didn't get any requirements for the signature
|
|
|
|
|
hahaha .. Thanks for your comments. And offcourse there is always a first time. You must be thankful to see such a worst site through my link and About balls if you dont have then I think you dont like others as well...
I hope this helps you to understand your problem.
|
|
|
|