Security :: Management Site Of Review?
Dec 29, 2010I work on a intranet site of management review,to insert the markes I have files for each module.I want only the
professor of module has the rightaccess to his file.How ?
I work on a intranet site of management review,to insert the markes I have files for each module.I want only the
professor of module has the rightaccess to his file.How ?
I need display navigation in my website with ASP.NET 4 components. Navigation use XmlSiteMapProvider and file hierarchy as XML file. Because my website is a CMS I am looking for a solution able to store hierarchy in DataBase or in some sort of Business Logic. I found out SQL Site Map Provider, which seems a workaround to store hierarchy in SQL. [URL]
View 1 RepliesHow to get details of our website in google search on right side pannal..For Eg..If you search for aspsnippet .com in google search you will get the desc of your website on the right side panal with in a square box
View 1 RepliesI am trying to find a good pattern to use for user access validation.
Basically on a webforms application I had a framework which used user roles to define access, ie, users were assigned into roles, and "pages" were granted access to a page. I had a table in the database with all the pages listed in it. Pages could have child pages that got their access inherited from the parent.
When defining access, I assigned the roles access to the pages. Users in the role then had access to the pages. It is fairly simple to manage as well. The way I implemented this was on a base class that every page inherited. On pageload/init I would check the page url and validate access and act appropriately.
However I am now working on a MVC application and need to implement something similar, however I can't find a good way to make my previous solution work. Purely because I don't have static pages as url paths. Also I am not sure how best to approach this as I now have controllers rather then aspx pages.
I have looked at the MVCSitemapprovider, but that does not work off a database, it needs a sitemap file. I need control of changing user persmissions on the fly.
I have 2 sites, one the main product site the other a secure site featuring the basket and checkout processes.
When a user clicks "add item to basket" I am creating a basket in a database and then adding the items to the basket. The theory was then to store the id from the database for the basket (the basketid) in a cookie, redirect the user to secure site, use the basket id from the cookie and display the contents in the basket.
However I am having trouble getting the secure site to use the same cookie. When I redirect the users to the secure site, the basket appears empty. I need to go back to the main site and then back to secure before the cookie appears.
Here is the code for the cookie
[Code]....
And then on the secure site this is how it gets the basket ID from the cookie
[Code]....
But like I say it's having problems. I've tried replacing the cookies with session variables as well but it didn't work.
I have 2 website A and B.
B site with windows authentication
I want to open B site as new window from A site, so its ask for windows credential. I have credential in A site. I am opening B site using Javascript.window.open.
how i can set credential for B site from A site.
I have an application that uses the ASPNET role provider.My SQL Server crashed so I took a backup of the database and restored it to a new SQL Server and changed the db connection string to that server.The web site runs but no users can login to the site.Is there something that I should have done when the db was on the other server?
View 6 RepliesI have a requirement where I have to transfer a user from Web Site 1 on Server A to web Site 2 on Server B.
On Web Site 1, I have to provide controls to enter user id and password and which have to be validated on Web Site 2 on server B, after validating them I have to redirect the user to Web site 2.
what is best way fo doing it. code examples are greatly appreciated.
Note: On Web Site 2, user login functionality is already existing and it is provided by ASP.Net login control, am not sure how to handle the user login process from two different places.
or is it the best way to move Web Site 2 from Server B to Server A so that, the same login controls will be shown using Iframe on Web Site A.
Working on my first asp.net webpage. i have followed video tutorials and implemented asp.net membership for login/security.Using Visual Studio 2010 i can open the Asp.net configuration page for management locally.But then if I want my site admin to manage users/security online, how is this done? Like manage through a web browser. I guess this asp.net configuration GUI is not available on the internet?
View 4 RepliesIs it possible to cache a hole site?ll its pages, images, js, db data etc...If so is it go/bad idea?
View 2 RepliesIs this piece of code where I lock a part of the function correct? Or can it have use drawbacks when multiple sessions ask concurrently for the same Exam? Purpose is that client that first asks for the Exam will assemble it, all next clients will get the cached version.
public Exam GetExamByExamDto(ExamDTO examDto, int languageId)
{
Log.Warn("GetExamByExamDto");
lock (LockString)
{
if (!ContainsExam(examDto.id, languageId))
{
Log.Warn("Assembling ExamDto");
var examAssembler = new ExamAssembler();
var exam = examAssembler.createExam(examDto);
if (AddToCache(exam))
{
_examDictionary.Add(examDto.id + "_" + languageId, exam);
}
Log.Warn("Returning non cached ExamDto");
return exam;
}
}
Log.Warn("Returning cached ExamDto");
return _examDictionary[examDto.id + "_" + languageId];
}
I have a feeling that this isn't the way to do it.
I have a site that I am trying to extend how long a session stays open even though the user is inactive. I have this set in my web.config
<sessionState mode="InProc" timeout="720" />
And this is set it IIS
Time-out (in minutes):
720
But it is still timing out after like 15 minutes.
asp.net.2 I am trying to update the website but the cache kips on working. How can I relies the cache on site.
View 7 RepliesI wanted to get a code review of my methods for creating a simple list/gallery display in ASP.NET. I am looking for specific ideas on how I might approach this same task differently. My goals are simplicity, rapid development, and ease-of-use.
The task: Create a simple image list view (gallery) for a folder in ASP.NET web forms.
How I Did It: I created the image controls on the fly and add them to a placeholder template. I added line breaks using literals controls too. Finally, I add a query string to the page for the "paging".
What other ways would one recommend to do this? I had considered to use a grid or listview. My goal was to do this really quickly.
I can place an Excel file in the root directory, use Browse and view an xlsx, xlsm or any other Excel file and it (sometimes) pops up in a browser window with no option to save or do anything other than view the Excel document (you can type in the cells and it gives you the option to save if there are any changes). I'm trying to find out how to do that exact thing client-side.
We have a server that allows a client to upload an Excel file and we want them to be able to review it only. If there is a way to bypass the Open message box that pops, that would be ideal, but just getting it to display in a separate, small browser window would be just what the doctor ordered. The Excel files are varied so the content is always different and not necessarily formatted the same. That removes the ability to go with named ranges and definitions.
Currently with the code we have, users can press a view button to review the file they uploaded for errors but it opens up the full version of Excel and then throws errors because it tries to force a save to a temp file. Not exactly ideal and very confusing to the user. I don't habve the exact code available to me at the moment, but I'm hoping that someone can point me in the right direction.
I am using the SQLDataReader to execute a Stored Procedure that accepts two parameters (BuildingTID and Department) to return the appropritae Value in my case The Director of the Department. My problem is I get the following error when I run the code that I added below for review. Let me also add that the user is selecting the values that I am using for the stored procedure from 2 DropDownLists. I am getting it when I try to assign the value that is in the Department DropDown
list to the first parameter.
Dim myParm As SqlParameter = getDirectorsCMD.Parameters.Add("@BuildingTID", SqlDbType.Int, 15).Value = (ddlDepartment.SelectedValue)
Also obviously there are more issues with my code than just the error because the datareader records property is false meaning I am not returning a row
I'm constructing a new cms with the option to create reviews and articles (blog items). Now if the user wants to write a review he/ she will want to add a lot of images in the text. Now my question to you is , what would be the best option to include those images (with keeping in mind that a CDN can be used later). I was thinking of the following methods:
Break an article in multiple blocks, each block can then include a picture and text. Just add the picture in the text via WYSIWYG editor (easiest option but not so versatile) Upload images separately and include them via tags in article text. Like Title{img_1}Content
I need to save how many times (seconds / minutes) each user spend in my site from his enterance to my site till exit it. How can I do this?
View 9 RepliesI´m about to program a common application/website scenario. It contains pages which are presented to users, and some business logic behind, with a database connection class.
My questions are:
Q1: Should the database class be singleton? If so, why? Because does it even matter when every single user is in their own process on the server, and therefore each user has their "own" singleton database instance?
Q2: How would you normally direct users around the site? Would the Default.aspx page create instances of the required classes? And when the user is directed to a new page, how would you normally refer to these instances?
Q3: What kind of general information do you save in the Session variable? Is it a big no-no to save class instances?
I need to get the calling page url referrer and host name. I works for me if the calling pages are within the same network. When a page is called from an internal site that are outside of my network, I got the following error:
Object reference not set to an instance of an object.
It failed on this line:
string userURL = Request.UrlReferrer.ToString();
I am wondering if it is possible to clear a session variable if the user navigates away from my site.
My example is I have a session storing the logged in user. This is checked for user access to each page.
If the user goes to another site (e.g. google) I want them to relog into the site.
This is to prevent others getting access to a users account if they use the same pc minutes.
I do have a logout that performs this and I know that it is impossible to make users use it! :)
I am looking for a means by which ASP.NET can create an Outlook MailItem and stream it to the client machine for the user to review prior to sending. I know that its possible to create files such as Word docs and Excel spreadsheets an then stream them, but I don't know how to do it with ASP.NET.
View 6 RepliesI have time card data collected onto an AS400, and have an establed TimeReview.aspx which allows the user to review Time In/Out, etc. I have a request to add some way for managers to review the time and add corrections. I cannot edit direct or add fields to the time table in the AS400. I do, however, have a SQL Server that I could use to collect this information, but I'm not sure of the best way to go about it.
Here's an example of what the table should look like, with the added fields on the right. "X" (Revise) would be a checkbok indicating that this line should be revised. An administrative staff member would pull up the report the next day and manuall edit the time within the AS400.
-- From AS400 table -- -- SQL table --
Time Card info - Empl ID | WO | Date In | Time In | Date Out | Time Out | ---- X (Revise) | Corrected Time In | Correct Time Out
My thought is use an Empl ID field in the SQL table and bind it to the AS400 Empl ID field (not sure how).
l am facing a problem with session.
If many users access the site, the session gets crashed and data which i store to access across pages is getting lost.
a best way to store data (as session does) so that i can use the data across my web application.
WebApp1: on IIS and configured with Windows authentication. Get User account from AD.
WebAPP2: a java web app on another windows box in same domain with authentication from AD
On web app1, I have a http handler like
public class MyHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string url = "http://WebApp2/Test";
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(url);
CredentialCache myCache = new CredentialCache();
NetworkCredential netCredential = new NetworkCredential("myname", "mypassword", "");
myCache.Add(new Uri(url), "Basic", netCredential);
//...
myReq.Credentials = myCache;
//....
}
}
in above way, I can set authentication in code and pass it WebApp2.
But I don't want to put name and password in code. User info already available on WebApp1: in context.User I can find out the user info who already logined into WebApp1, so I want to pass this credential to WebApp2. I have tried to do following:
myReq.Credentials = CredentialCache.DefaultCredentials;
but I am failed becuast there is no data in CredentialCache.DefaultCredentials.