.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Secure transfer of files in a wcf Service.?help and ideas needed..!!!

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :WCF

hey wcf guys...!! hi all

hmmm.To start with I have developed a wcf application...where files are uploaded and th wcf service also supports resume functionality as well...That is done and now remains SECURITY!!.Fine i want the files to be uploaded in a secure manner..so that no one else on the channel can access it..I mean i requrire security,,obviously..for it(application) to go live..


Now ,i actually dont know how could i implement it??..should i attach a certificate??how do i do that?? Using BasicHttpBinding in the application .Have no idea as to how will i implement security..so could any kind person please give me a clear idea an d help me go through this..??

anyway..thanks in advance..waiting for some good ideas and responses...



Mumtaz Surani

View Complete Post

More Related Resource Links

How to transfer files between computer and mobile device using bluetooth

What is Bluetooth? How can I have it on my computer?

Bluetooth wireless technology is a communication technology that allows two devices to communicate wirelessly. Most of the notebooks are nowadays equipped with bluetooth. For those notebooks or computers that don't, you can use a bluetooth dongle to add the functionality and it just costs you around $5. Although higher price range bluetooth dongles are available but it makes no sense of buying them if you just plan to connect your mobile device to the computer. Look for one that has Bluetooth v2.0 + EDR (Enhance Data Rate) supporting speeds of upto 3Mbps and with Vista support. You can easily have one of that kind in just $5.

Setting up bluetooth to work on your computer

Just Insert the bluetooth dongle in the USB.
It should get detected by your Operating System and should be ready to use. In case it is just detected as a new hardware, you need to install drivers for it that came with your bluetooth dongle (You can try Google to find the drivers).
Once drivers are installed, a bluetooth notification icon will appear in your system tray.
Right Click on it to access Settings (This may vary with your bluetooth dongle).
Make sure you have turned Discovery On (It allow others to see your computer).
Switch On the bluetooth on the mobile device.

Cutting Edge: Building A Secure AJAX Service Layer


This month Dino builds a service layer that authenticates users of Silverlight 2 and ASP.NET AJAX services to prevent illegal access to sensitive back-end services.

Dino Esposito

MSDN Magazine September 2008

BITS: Write Auto-Updating Apps with .NET and the Background Intelligent Transfer Service API


Both the .NET Framework and Windows have some very interesting APIs for creating applications that are capable of updating themselves automatically over a network. There are many advantages to writing your application to update itself like Windows Update does, including convenience for your users, from easier maintenance to network administration. Automatic updates require attention to factors such as discovery, security, and file replacement. In this article, the author covers the BITS API as well as a number of features of the .NET Framework that take care of these facets of auto-updating using the same facilities that the Windows Update uses.

Jason Clark

MSDN Magazine February 2003

How to Rip DVD, Convert Video and Transfer Your Files From ipod to Computer

Are you always afraid of losing or damaging your precious DVD movie collection or want to put them on your computer for more convenient use? Or you prefer to convert video among different video formats or wonderful videos on portable devices such as iPod, iPhone, PSP, Mobile Phone, Zune, Creative Zen, iRiver, Sansa, etc.? Or you need transfer your files on iPod/iPhone to your computer in fear of losing them? Tipard DVD Ripper Pack is such a pupular and useful program that is combined with DVD Rip software, Video Converter and iPod to PC Transfer. It can rip DVD and convert video to MP4, H.264, AVI, MP3, WMV, WMA, FLV, MKV, MPEG-1, MPEG-2, 3GP, 3GPP, VOB, DivX, MOV, RM, RMVB, M4A, AAC, WAV, etc. If you are interested in it, why not have a try?To start it you should free download Tipard DVD Ripper Pack and install it.Note:Shown as the image above, if you want to rip DVD, please select DVD Ripper; convert video select video converter or transfer files select iPod Transfer to PC. Take one piece of them for example.How to Convert video to popular videoAfter you click "Video Converter", another interface appears as follows:Step 1: Add filesClick "Add File" to add your video files.Step 2: Set output video formatClick "Profile" button from the drop-down list to select the output video format such as AVI, MPG, MPEG and WMV. You can click the "Settings&

How to Programatically SetCredentials for Secure Store Service Application in Sharepoint 2010 using

I have to setup Credentials for Secure Store Service application programatically. To get Stored Credentials I have following code and its working fine. using (SPSite site = new SPSite("http://vtlssp2010Dev")) //using (SPSite site = new SPSite("http://" + System.Environment.MachineName + "/sites/Site_Name"))d { Console.WriteLine(site.RootWeb.CurrentUser.Name); SPServiceContext context = SPServiceContext.GetContext(site); prov.Context = context; try { SecureStoreCredentialCollection cc = prov.GetCredentials(appID); foreach (SecureStoreCredential c in cc) { IntPtr ptr = System.Runtime.InteropServices.Marshal.SecureStringToBSTR(c.Credential); string sDecrypString = System.Runtime.InteropServices.Marshal.PtrToStringUni(ptr); Console.WriteLine(sDecrypString); } } catch (Exception ex) { Console.WriteLine("Unable to get credentials for application " + appID); Console.WriteLine(ex.Message); } Console.ReadLine(); } } All I want is to programmatically do set credentials like explained in this example on msdn. http://msdn.microsoft.com/en-us/library/ff798456.aspx Please help. Shamshad Ali  

Secure Service Store and custom web application.

 Hello All,  I have a problem for which I would like to use the Secure Service Store.  I've searched for similar solutions involving the SSS but I've not had any success yet.  Maybe I'm missing something obvious or going about it the wrong way.   We have an external application (actually, a number of external applications) we'd like to embed in our SharePoint site using an iframe or the Page Viewer web part.  The embedded application uses a custom forms based authentication scheme and I want to prevent the situation where a user has to log into our application then log into the embedded application.  Is there anything available the help post the credentials from SSS to the custom application?  The only think I can think to do is write some code that mimics a post to the login page of the embedded app and, if needed, write a stripped down or simpler login page for the embedded app to make that easier.  For my immediate task I have quite a bit of control over the source of both application and could write custom code on both sides if I had to, but I'd rather have a solution that only involve configuration or, at most, custom code on the SharePoint side.  Thanks,  Brandon 

KB981145 for Microsoft .NET Framework 3.5 Service Pack 1 still needed for .Net Framework 4.0

Hi, KB981145 is hotfix for Microsoft .NET Framework 3.5 Service Pack 1. Its not included in Update for Microsoft .NET Framework 3.5 Service Pack 1. I want to know that Microsoft .NET Framework 4 enhancements/imporvements cover KB981145 or not. In other words, Will using .Net 4 instead of earlier versions will solve the issues fixed by KB981145 or not? Thanks

Sharepoint Search and Secure Store Service not working

Hi There I am having issues with a few Sharepoint Services When I try to search for a document on any SharePoint site, I recieve an "Internal Server Error Exception". However when I checked the log files, I couldn't find any error messages matching with the given correlation ID. The search was working 2-3 weeks ago. Also 2 weeks ago, I started receiving warnings in the Health Analyzer saying “The Security token service is not available”. I am wondering if the security token service breaking down is related to the search issues, and if so what suggestions I could try to fix this issue. I am also unable to access the secure store service. In Central Administration->Application Management->Manage Service Applications, I try to click on the Secure Store Service, but there is no Proxy attached to the service, and I receive a message “No Secure Store Service Application Proxy ID was found”. When I check the Logfile, I receive these errors: 08/10/2010 11:11:32.94               w3wp.exe (0x18E4)                                      0x0ADC SharePoint Foundation     &nb

How to get all Secure Store Service (SSS) applications in the farm

Hello everyone, I am trying to use SharePoint 2010 Secure Store Service (next SSS) in my application to get credentials to external system. Is there any way to get all possible applications (IDs) from API provided. Currently I am using next code to get all applications: SecureStoreProvider provider = SecureStoreProviderFactory.Create() as SecureStoreProvider;             provider.Context = SPServiceContext.GetContext(SPServiceApplicationProxyGroup.Default, SPSiteSubscriptionIdentifier.Default);             if (provider != null)             {                 foreach (var app in provider.GetTargetApplications())                 {                     Console.WriteLine(app.Name);                 }             } However it depends on SPServiceApplicationProxyGroup.Default and SPSiteSubscriptionIdentifier.Default parameters. So in case I remove SSS from

Create a new target application - Secure Store Service administration issues

Hi,I am trying to create new target application, when I go to Secure Store Service in Centra admin I have:Cannot complete this action as the Secure Store Shared Service is not responding. Please contact your administrator.I have used this few days ago and avarything else is working fine on the server, and I have applications created with it running fine.Any help is appreciated.cheersValko

baton files and schemas - transfer protocols

Anyone here ever hear of "baton files"?  We're supposed to use them in an ETL project.  It's apparently an old mainframe trick - you transfer the big, fat data file first foo.csv, and when that's done you transfer a tiny baton file, foo.baton (or other suffix).  The baton file's mere existence tells you the big file has finished transfering in, which might otherwise be hard to tell.  For extra credit the baton file can contain useful information like a rowcount and/or some aggregates or checksums of the accompanying data. OK, I 've seen that before, but apparently there's a second part of this kind of protocol, where they also send along a table schema in SQL.  We have one project suggesting that this be checked against our table formats every time, in production, in case the sender unexpectedly changes format (and yet is good enough to send us the changed and accurate schema!). Anyone ever hear of this second part, and can you say what the origin might be? And do you think it's a good idea? Thanks. Josh  

Issues with secure token service

Recently, I converted my sharepoint site from classic authentication to claims based, using ldap.  I finally got the Ldap connection to work, but my secure token service is not working. When I try to log in, I just get taken to an error page. I know the LDAP is working because when I search for users under "add users," people show up under my forms auth.  In central administration, it says the Security Token Service is not available. The explanation states that it is not issuing tokens and could be malfunctioning or in a bad state. When I look at my event logs, I get two errors. The first one says, "Could not connect to http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc. TCP error code 10061: No connection could be made because the target machine actively refused it" The other entry, which is only a warning, is a lot more helpful. The source is ASP.NET 2.0.50727.0 and the task category is web event. Here are the contents:
<script> function Toggle(node) { if (!window.fullyLoaded) return; // Expand the branch? if (node.nextSibling.style.display == 'none') { // Change the sign from "+" to "-". var tBodyNode = node.childNodes[0]; var trNode = tBodyNode.childNodes[0]; var tdNode = trNode.childNodes[0]; var bNode = tdNode.childNodes[0]; var textNode = bNode.childNodes[0]; i

How to configure secure communication between web client in DMZ and WCF-service in domain



I have a question regarding security in this scenario:

In the DMZ I have an server hosting my Web application. I'm using HTTPS between the user/browser and my web application (using certificate).

My web application is supposed to communicate with a service behind the firewall (inside the domain) hosted in IIS 7.
I'm using wsHttpBinding between my web application and the WCF-service.If I have this security configuration everything works fine:

<binding name="WSHttpBinding_ServiceLong" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:20:30" <br/>

Web Service Unable to access Directory (Temporary ASP.NET Files) CS0016

QuestionMoving web service to a production level server. This is not a new server, but is new to running an ASP.NET 2.0 web service. No other websites or services existed on this server.

Installed .Net 2 and specified that ASP is registered for 2.0 using aspnet_regiis. Installed missing components such as Front page extensions. When I try to browse to the services asmx page I get the error saying that the process has a compilation error and cannot access the asp.net temp directory under the 2.0 Framework. I looked at the directory and it appears that the asp.net process and others have correct access.

Note a basic asp.net page will come up as well as a basic html page.

All comments are welcome.

  • .Net 2
  • ASP.NET aspnet_regiis specifies .Net 2 as root
  • C#
  • IIS6
  • Windows Server 2003 SP1

How to secure a web service consumed with AJAX


When a web service is consumed from server side, the web service may be implemented in a way to check credentials of the caller. In the case of calling the web service from javascript, how to secure the service since no credentials can be passed into a javascript function becuase of the visibility in source view? 

Intermittent timeout calling ASMX web service yet Upload data transfer completes OK

I'm calling my webservice from a web page and getting a timeout despite setting very high values in my web.config files. This occurs intermittently when the file is usually pretty large but yet the file is still getting uploaded completely (as if the timeout DID NOT occur). Here is a function in my .aspx file which calls my ASMX proxy class:
private void UploadFile(HttpPostedFile postedFile, string fileNameOnly) 
    // create an instance of the proxy class to talk to our service; calling it client: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend