Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Make ClickOnce Work With ASP.NET Forms Authentication

, , 20 Mar 2008 CPOL
A solution for securing access to a ClickOnce application using ASP.NET Forms authentication.
clickoncesite_1.0.zip
ClickOnceSite
ClickOnceHandler
bin
My Project
Application.myapp
Settings.settings
obj
Debug
ClickOnceHandler.dll
TempPE
ClickOnceSite
App_Data
bin
ClickOnceApp
Application Files
XBAPFormsAuth_1_0_0_0
XBAPFormsAuth.exe.deploy
XBAPFormsAuth.exe.manifest
XBAPFormsAuth.xbap
XBAPRef.dll.deploy
XBAPFormsAuth.xbap
My Project
Application.myapp
Settings.settings
obj
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="ClickOnceSite._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <!--<asp:HyperLink runat="server" ID="m_HyperLink" Text="Advantage" NavigateUrl="advWPFWebInterface.xbap"/>-->
        <a href="<%= String.Format("http://localhost/ClickOnceSite/advWPFWebInterface.xbap?{0}={1}", FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(CType(Context.User.Identity, FormsIdentity).Ticket)) %>" >Advantage</a>
    </div>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Authors

David P Henry

United States United States
No Biography provided

Graham Murray

United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141223.1 | Last Updated 20 Mar 2008
Article Copyright 2008 by David P Henry, Graham Murray
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid