C# - Implementing Web Service With WCF 4.0 With Authentification?
Nov 3, 2010
I am starting development of the new project and since I am new in the WCF world I want to ask your advice.I am going to implement web-service which will provide data for WPF client and for ASP.NET site. Web site and web service should be hosted in the Windows share hosting (not didicated server) and this fact is bothering me. WPF client and web site will provide almost the same functionality for the user, so I want to implement all logic inside web service not to duplicate it in the client and web site. Not sure what is the best way to implement such web-service - REST, SOAP or something else? Please, help me with selecting technology for web-service creation, I just want to get direction for optimal solution. 10x.Update: Sorry I did not wrote details. Service will be something like on-line shop with admin panel, so web service will be used for getting products and for adding new product to the system. It does not support tons of customers, it's just solution for small web-shops.
View 1 Replies
Similar Messages:
Mar 22, 2011
I have a website with WebForms Authentification enabled using a MySQL provider and i've also an ASP.NET Profile. I have the Role: NormalUsers, and HighLevelUsers. I have a folder named:"Users" that has access rules to: Deny ALL, Allow NormalUsers. I have a page names: MyProfile.aspx in the folder Users
First: I want the users to login with an email and a password not a username and a password.
Second: Now i want anonymous users to connect with their Windows Live ID and use my website as NormalUser, I also want to allow them to migrate their account to a normal WebForms account with a simple click that invokes the CreateUser methods and get the Email, Name, FirstName ..ect from their Windows live account to the createUser method.
Platform: Visual Studio 2010 (No SP), .NET 4, ASP.NET WebForms.
View 4 Replies
Jul 19, 2010
Suppose I've written my own authentication module implementing IHttpModule. It is not really done but there are good resources so I can figure it out.
There are also tutorials on how to add custom created module to Web.config. But how can I replace some default module ? That is how do I remove default authentication module from execution path ?
Can I just remove following lines from Web.config?
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880"/>
</authentication>
If I remove them will the default authentication module still work ? Of cause there is no real need to remove that module even if I don't use it... But it'll save some processor time and I'll feel better.
That was easy, not the hard part: can I replace HttpContext implementation? I have my own session class called Session and I don't want that HttpSessionState to be in HttpContext. I'd also like to replace User property of HttpContext. So I guess I need to create my own implementation of HttpContext and force my aplication to use it somehow. How do I do it ?
View 1 Replies
Sep 1, 2010
In my facebook canvas applikation, i store the access token in session. (I use ASP.NET MVC)
But i want to store the access token in a database along with the facebook user id that i can save different access tokens for different facebook users accessing my application.
So when i query the facebook user id and if it doen't return any access token, i request permissions and get the access token for that user.
How do i access the Facebook UserID for the user accessing my canvas application before doing any authentification?
View 2 Replies
Feb 5, 2010
I have given a task in which I need to encrypt an user's ID using AES encryption, what they want is I need to pass in a parameter in a website just like this.
[URL]
Parameter : ?param= encrypted text
aside from that there was an attched php sample that they want me to follow to encrypt but I don't have an idea on how to convert this one in .NET
function getEncrypt($sStr, $sKey, $sIV){
$sCipher = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $sKey, $sStr, MCRYPT_MODE_CFB, $sIV);
return bin2hex($sCipher);
}
$sStr = "13410##13";
$sKey = "mediaservice1234";
$sKey = "kjcemsdev3jangho"; // Do not change
$sIV = "fs0tjwkdgh0akstp"; // Do not change
$tmp= getEncrypt($sStr, $sKey, $sIV);
View 2 Replies
Jan 30, 2011
I've implemented IHierarchicalDataSource, IHierarchicalEnumerable and IHierarchyData. The TreeView displays everything correctly. But where should I specify the URL that should redirect the user where needed when he clicks on the TreeView's item?
View 1 Replies
Mar 18, 2010
I am looking at implementing a custom MappingSource as side project. It needs to be something along the lines of AttributeMappingSource and XmlMappingSource, except that it won't be using attributes or xml. This has been a problem so far. All the documentation I've seen uses these two, and only these two. I know how to define the new classes and implement the abstract methods, but there are a few problem. Let's take a look at the mapping source first:
public class CustomMappingSource : MappingSource
{
protected override MetaModel CreateModel(Type dataContextType)
{
// it is suggested to create a new metamodel and pass in
// the current metamodel held in the datacontext.
return new CustomMetaModel(GetModel(dataContextType));
}
}
Ok so far, except that it's a new generic context, and no model exists yet. For example, I want to be able to do this:
DataContext = new DataContext(connectionString, new CustomMappingSource());
Now let's look at one of the CustomMetaModel's overriden methods:
public override MetaTable GetTable(Type rowType)
{
// there are no methods or collection exposed in 'this' to
// add, remove or alter the table mappings.
}
How do I do this? as you might be guessing at this point, I am looking into building a FluentMappingSource. NO! Don't point me to FluentLinqToSql. I have it and their mapping source isn't even derived from MappingSource.
View 1 Replies
Apr 21, 2010
i have a requirement that i need to download xml file from ftp and store it in a local folder and i have to read the xml and store it in my database. So i need to read the xml file and insert into database as bulk way. not instant insert. so which would the best way?
View 9 Replies
May 5, 2010
I am implementing an eCommerce application using ASP.Net. I would like to know if custom Google search is sufficient enough or if we plan to go implement our search functionality.. how do we go about doing it?
View 3 Replies
Feb 3, 2010
I am building a web application in ASP.NET using C#.NET which sends a SMS using clickatell.I am trying unsuccessfully to receive a status back from clickatell by creating a CallBack Page called ClickatellCallBack.aspx Here is the codebehind of the Page:
public partial class ClickatellCallBack : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)[code]....
Basically, this Page retrieves the Query String values sent from clickatell and inserts them into a database table.I have registered the following Callback URL:
http://www.mydomain.com/ClickatellCallBack.aspx with clickatell and selected the Callback Type: HTTP GET
In my 'sendmsg' command I set delivery acknowledgement and callback request as follows: deliv_ack=1 and callback=3
The only problem being that nothing appears to be happening. The CallBack URL doesn't appear to be reached by clickatell.Do I need to implement this Callback URL using something other than an ASP.NET Page? Is there some clickatell setting I'm missing?
View 1 Replies
Jan 27, 2010
I have the following code where i enable the user to insert their password to retrieve their username.
[code]....
But nothing happens, it doesnt work. I want it to do the check and then do something. I am just testing with a label for the time being.
View 5 Replies
Mar 1, 2011
I've been looking at implementing Url Re-Writing into my site, and have been confused by the sheer magnitude of different methods of doing it!
Anyway, what I'd like to do is convert my existing url into something more readable and search- engine friendly.
For example, my current Url is '~/Magician?localityId=x' (where x = the id of a place name)
and I'd like it to be '~/placename-Magician' (where placename = that retrieved from the querystring)
I use the localityId to query the database with, in order to get the relevant place name.
Does anybody know the best method to use for this, and can you point me in the direction of a good tutorial for that method?
View 7 Replies
Aug 16, 2010
i have implemented the the openid in my page using dotnet open id when i get authenticated iam storing the details provided by openid provider in my database and creating a session of that username and redirecting the user to login protected page it is working fine but some time if i left the page idle for some time and then do any kind of postback then the session is lost and my page do not allows me to do any thing as it is login protected some time it is working fine without any problem. can you suggest me why is it so.
View 1 Replies
Jan 26, 2011
I'm looking to implement a membership system using OpenID for my ASP.NET application, similar to the system used here on StackOverflow. I'm aware that the OpenAuth library is generally recognized as the way to go, but I'm having trouble figuring out how to implement it.
I use NHibernate to persist my domain objects. I have a Users table with a username column, email column, etc. I'm not sure how to integrate OpenID with my own users table, and I haven't found any good tutorials on this. Does anyone have any experience with this? What is the best way to go about doing it?
View 3 Replies
May 5, 2010
I am doing web based projects in dotnet. Currently I am implementing security using session variables. I keep current user id and user type in session and authenticate user from these session variables (say Session["UserId"],Session["UserName"] and Session["UserType"]).
I've heard that such security can be broken and applications can be hacked very easily, like it is possible to get session id and directly connect to that session id etc.
View 1 Replies
Aug 9, 2010
We have an app with standard ASP.net forms. I would like to use MVC and I just wondered is it possible to re-use a master page from my main site?
View 3 Replies
May 8, 2010
I am implementing an multilingual web site using ASP.Net. The languages are English,French and Arabic. Please note that Arabic's direction is RTL. What is the best way to implement the multilingual support. I am planning to use the .Net localization feature but the website texts are stored in DB. For the controls ( form controls) , I can used resx file. Do I need to build two different pages ( one for LTR and another for RTL )? Or can I have one ASPx file for all the three languages?
I would like to hear some best practices in implementing these kind of web applications.
View 1 Replies
Apr 3, 2011
I want to implement a forgot-password feature in asp.net mvc that allows users to reset their password, and have some questions in this regard: Lets say that before allowing users to reset their password, I want to verify some extra information such as their first and last name. This info is not stored by default in the table created by aspnet_regsql. What is the recommended approach to address such issues?
Should I store this kind of info in a separate table, and use table joins to verify OR should i modify the schema of the table generated by aspnet_regsql (how?) so that I don't have to use joins? Do I need to write a custom provider OR would that not be necessary? I have read at places e.g. in this post that instead of emailing a temporary password, an alternative is to email a URL that when clicked allows users to change their password. How is this done? How to ensure that the URL expires after 1 hour?
View 1 Replies
Feb 10, 2010
I have a page which gives user to generate report based on different filters selected. my thoughts Loop through each filter control (checkbox, multi select list, radiobox list) and build dynamic where conditions and conjunctions for each filter and then run query Get all the data (i think this will causes an overload with all 4-5 tables joined) and then use Linq to filter this data based on user selection Is there a better way to implement this?
View 2 Replies
Jun 21, 2010
I need an example on how to implement AES encryption/decryption in .NET. I've been googling but haven't yet found any good examples. I've for example found AES example whih after some research wasn't 100% AES. I have to make sure by AES encryption/decryption is 100% AES, as I have to send email to the authorities explaining how I use AES (with secret key all), so they can hire some encryption expert which verify that we encrypt/decrypt it correctly. So he can verify that the what I implemented in AES is actually 100%. I'm reading the AES standard and how it's to be implemted in .NET Here is some code I'm having trouble with:
[Code]....
Which throws an CryptographicException: Specified key is not a valid size for this algorithm.
View 1 Replies
Jan 9, 2011
i am new to webforms and come from a php background.
when creating complex web apps in php i usually have a lot of global functions in an includes file. these functions are then made available to other php pages.
how do you implement this in asp.net webforms?
View 1 Replies
Aug 2, 2010
I running my static analysis checks again and I'm getting 100s of nags on
Label foo = new Label(); //Where this is an ASP.NET web forms label
Do I need to call dispose on these web forms labels? Also, how late in the page life cycle is it safe to call Dispose on these? If a class implements IDisposable, but doesn't actually do anything in it, is there any harm in not calling dispose?
(Yes, I have already read that closing connections is a good thing and using blocks are a good thing, too.)
DataSet is another class that seems to implement IDisposable for inexplicable reasons.
View 3 Replies
Jun 12, 2010
I need to implement an AutoComplete feature for a voting system with drop down names. Here is the code for the multiple text boxes. All need to have the same drop down names, which I would like to hard code, and not put in a DB.
[Code]....
I don't really know how to do an AutoComplete function. I've searched on the internet, but none are simple, and none are quite what I'm looking for.
View 4 Replies
Feb 12, 2011
I wanted to display the relative time difference in my razor view page.
In my model, which I am passing to the view, in which I have a dateTime datatype variable. Now, I want to implement a funtion
like this
[Code]....
I am unsure how should I define my funtion and call it inside my razor view. In the funtion, I will only pass the Datetime variable. It should only return the time in string format.
View 3 Replies
Apr 12, 2010
I'm working on a project that involves exporting HTML to PDF. I was told that this can be accomplished with a a free library called ITextSharp:http://itextsharp.sourceforge.net/This looks like it's actually a JAVA-based interface. Does anyone know how to actually inistall this and reference these dlls in your ASP.Net project? Maybe there there's a different version of ITextSharp for .Net that I missed...
View 3 Replies