Security :: Restricted Method Access In WCF?
Jul 12, 2010I have a WCF service and there are four methods in it. I want to allow 2 methods to client 1 and the other 2 methods to client 2.
View 2 RepliesI have a WCF service and there are four methods in it. I want to allow 2 methods to client 1 and the other 2 methods to client 2.
View 2 RepliesI want to be able to control access to photos and PDF documents at run time.
I want users to be able to download the photos and documents as soon as they pay for them instead of having to wait for me to email the items to them.
What's the best way to do this? I am using VB.net, SQL Server, and ASP.net.
I am entry level to lower-middle in my programming skills, but can usually follow along.
I have a shared folder with directories on a remote server that I am trying to access with the method System.IO.Directory.GetDirectories(). This folder is based off of the credentials gotten from windows authentication. My problem is that everything works fun when I debug the Web Application in the built in IIS in VS, but when I set it up in IIS V5.1, it tells me that I have an invalid username and password. I am using Visual Studio 2005 on a Microsoft XP SP2 machine.
View 5 RepliesThis could be very straight forward for some of you, but I got caught up. I am doing very simple test - browsing from IIS Manager to see the default page or "under Construction", however I am being challenged to provide my login credential . When I provide my login credential, I am able to see the default page. I wanted to see the default page without providing my credential since Enable anoymous access + basic authentication I am simply wanted to see the default page asit is working on other servers except this one. I have included screen print to make sure may question is clear.
View 3 RepliesWe have a website where user registration is very specific to sub domains, i.e if you get registered as usera to sub1.sample.com, then you can register with same user name usera with sub2.sample.com
Now we are planning to implement OpenID. How can I restrict this behavior if OpenID is implemented?
I am working on a site where I need to set different countries get restricted. The selected countries don't able to download the contet of that site? How do I do this.
View 3 RepliesI am trying to implement Login/Logout functionality in my website without using inbuilt functionality of Login controls in ASP.NET. In some pages, which require the user to be logged in, I have written this in Page_Load
if (Session["cod"] == null && Session["admin"] == null)
{
Response.Redirect("You need to Login.aspx");
}
if (Session["cod"] != null || Session["admin"] != null)
{
LinkButton1.Text = "Logout";
}
if (Page.IsPostBack == false)
{
log_bind();
grid1_bind();
grid2_bind();
}
But while I was testing this, I noticed that when I press the Back/Forward button on the browser, these pages are viewable without being logged in. How do I prevent this?
I'm trying to use the Membership.CreateUser method without passing a security question and answer. I set them to string.empty, but no go. I have my provider set to not require a question in my web.config. What am I doing wrong?
[Code]....
i m not able to open certain sites from internet explorer 7.it is showing all sites as restricted .
View 12 RepliesI trying dotnetzip on localhost everything works fine.but on a real dotnet hosting it raises error :
Access to the path 'C:inetpubvhostslahblah.comsubdomains
aporhttpdocsDotNetZip-luqevaxu.tmp' is denied.
using (ZipFile zip = new ZipFile(Server.MapPath("~")+"/a.zip"))
{
zip.AddFile(Server.MapPath("~")+"/deneme.txt");
zip.Save();
}
I am going to making asp.net 4.0 for first time. I was making my all application in asp.net 2.0 where I was using DAL and BLL method. In that DAL I was making Table Adapter.
Now I am going to make application in asp.net 4.0 and I am thing that my application will become more complex and huge data. Can somebody guide me about stable and fast method for data manipulate like insert, update, and delete also complex query.
I'm writing a simple Intranet application using windows authentication. I want to restrict access to Safe/UCantSeeMe.aspx. I am aware of the AuthorizeAttribute, but this only works on methods. I also found a good post on doing this with the MVC pattern, but I'm not using MVC. This can be done with roles in forms based security. I read on MSDN that using windows based security means roles are based on groups, but it doesn't go into any detail. how can I restrict access to Safe/UCantSeeMe.aspx?
View 1 RepliesI have implemented role based security in my asp.net 2.0 vb.net application using windows authentication and the windowstokenroleprovider and limiting access to certain pages using the location tag to specific active directory groups.
The issue is that when a user tries to access a page they are not authorized to view it brings up a login prompt and when it does not pass it takes them to the default page that tells them they are not authorized to view the page. I am wondering if there is a way to throw up a custom page that tells them they are not athorized to view the page that I can incorporate into the site itself with the header and so forth? if this page could come up in lieu of the sign in box popping up as well.
[ASP.NET 3.5, FormsAuthentication, SQL Server]
In the Roles table there is Role, and RoleType.
I have 3different roles, 2 of which have sub-roles.
Example
Role----------------------Type
Adminstrator
Subscriber---Basic
Subscriber---Business
I need to implement Code Access Security, and URL based security using the roles & types...
For instance, the (Subscriber/Basic) would need to view a different set of pages, and have different access to things then a (Subscriber/Business).
I think I can handle the Code Access security with a custom attribute, but I am unsure to how enforce a User be apart of 2 roles in the URL Authorization.
I am currently using the web.config to deny/allow access to the directories/pages.
e.g.
/Areas/Admin/web.config
[Code]....
Is it possible to force the user to be apart of 2 roles with this technique?
i developed an asp.net(2.0) applicaions which contains the attachments of the clients . these attachments are saved in the shared folder and retrive the file when the user requests.if i maintain the application and the shared folders in the same system it will work properly.if i maintain the application in one server and the file folder in the other server i face a lot of security issus like1.Access Denied2.Couldnot find the part of the path......for this i made an common account for the application server and the file server and also set impersonation to true.Even the i got the couldnot find the part of the path error.i already gave the everyone with full control to the shared folder and i added the common account and gave it to full controlIs there is any alternate for the save and retrive the files to and from the shared folder.
View 3 RepliesI've moved a class in my project into a class Library in the same solution. I've added a reference in the web project to the class library.
How do I access the methods in the class library?
I want to access the user session from a web method. But when I check for the session object, its nothing! How can I access the current user's session from the webmethod?
My code:
<System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _.......
i have a property Model.Feeds
i would like to add value to Feeds in javascript metod:
function DataRetrieved(data) {
'<%=Model.Feeds %>' = data;
}
'<%=Model.Feeds %>' not works because its will be recognized as string.
how to access property of model.
I want to access my gridview in the static method? I am doing async call from javascript, I need code for this,
[System.Web.Services.WebMethod()]
public static void bindGrid(string userinfoId, int row)
{
GridView gv;
gv = (GridView)gvParent.Rows[row - 1].FindControl("gvChild");
gv.DataSource = GetProfileData(userinfoId);
gv.DataBind();
}
i want to access grid view,gridview is not static. I want to know, Is their any possiblity for using gridview in static method.? Yes or No.
I am working on my company intranet and trying to integrate it with our existing MS Access applications.
I need to provide the ability to have the client click on a link/button from an aspx page and have it call a function in the MS access application to look up the corresponding record.
I came accross the thread [URL] but that is not really what I want as the ADP application will already be running on the client I just need to pass it a value.
Alternitively if I could start a new instance of the ADP passing it a parameter on open to find the correct record that would be a compromise.
Do i remove the ability to call a method from the class my page is inherited from?
I am trying to build my custom Role Provider and certain method i not want to be accessible.
using the code below how come I cannot access a public method inside of a Site.Master page from a page using the Site.Master page:
Site.Master page:
[Code]....
I have one main doubt for long perioad, If we access the DB using SqlDataSource and ObjectDataSource, Can i know which is the fastest accessing the DB.
View 5 RepliesI have a Solution in which i m using Gridview which stores image inside it. Every time when user uploads images and clicked on button, image get inserted into Gridview.
But every time user hits on button page get postback,so to avoid this i used web method which is get called when user hits on button (html button). But when i m trying to bind gridview in this method.It is not get accessed .
how i access this gridview inside web method? Why Web methods are always static?Is there any other way to do this?
I have some confusion with singleton class, below are my some points:
1.Can singleton class have static method?,if yes then how we call that methods?
2.what is main difference between Static class and Singleton Class?
I have created my singleton class as follows:
[Code]....
In Above class structure I have created two method one is Static and second is non static, When I am trying to access Static Method it gives me compile time error.
How can I use static method of singleton class?