Is this possible? My entire web site is being built dynamically using
WebPart's and a lot of it will be anonymous. How do I load these parts
dynamically using WebPartManager. AddWebPart() and not use
Personalization . I think I am saying this correctly. When I disable
Personalization in the WebPartManager tag and use AddWebPart(), I am
told Personalization is not enabled....
There is also a defaut Authorization entry in IIS specifying all users,
all verbs. What else am I missing?
Please say so if you need code snippets. Or you can point me to an
article. From what I've been reading, I cannot find what I need. 9 3398
I think it is not possible to enable design mode for Webpartmanager control.
I had same problem and I googled it but could not find a proper solution.
Also on ASP.NET tutorial, they said that you must login to switch to the
design mode.
Thanks
"SlimFlem" <sl******@gmail .com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. . Is this possible? My entire web site is being built dynamically using WebPart's and a lot of it will be anonymous. How do I load these parts dynamically using WebPartManager. AddWebPart() and not use Personalization . I think I am saying this correctly. When I disable Personalization in the WebPartManager tag and use AddWebPart(), I am told Personalization is not enabled....
There is also a defaut Authorization entry in IIS specifying all users, all verbs. What else am I missing?
Please say so if you need code snippets. Or you can point me to an article. From what I've been reading, I cannot find what I need.
I found this approach very interesting if you don't require uses to login to
your site. http://www.codeproject.com/aspnet/anonywebparts.asp
"SlimFlem" wrote: Is this possible? My entire web site is being built dynamically using WebPart's and a lot of it will be anonymous. How do I load these parts dynamically using WebPartManager. AddWebPart() and not use Personalization . I think I am saying this correctly. When I disable Personalization in the WebPartManager tag and use AddWebPart(), I am told Personalization is not enabled....
There is also a defaut Authorization entry in IIS specifying all users, all verbs. What else am I missing?
Please say so if you need code snippets. Or you can point me to an article. From what I've been reading, I cannot find what I need.
Thank you! I will look this over. Thanks for the response.
This is exactly what I need, thank you very much for the link. =)
glad to assist.
"SlimFlem" wrote: This is exactly what I need, thank you very much for the link. =)
Hi maybe you can help with one more thing. I have implemented the
Cookie code in the article, but my Page.User object is always null and
I don't understand why. I haven't done a lot with Forms Authentication
before, but it was my understanding the when placing the .ASPXAUTH
cookie in the Cookies collection, this essentially makes the user
IsAuthenticated = true and the User object not null.
What am I missing. My code is the C# version of the code in the
article. I am doing this in an HttpModule and not in Page_Load(). I
have tried both but it makes no difference. Is there something else I
should be doing to get the User object set and IsAuthenticated to be
true?
Thanks.
The only difference between the article and my code is that I have an
IHttpModule that runs first to perform some Url remapping, or not. If
my Url is remapped, I do a Server.Transfer to avoid a duplicate
request, otherwise, the module does nothing and the request happens as
normal.
The module that performs the FormsAuthentica tion and creates the
HttpCookie runs first followed by the Url remapping IHttpModule.
Is it required to do a Response.Redire ct() so the .ASPXAUTH cookie is
recognized and the User object is set?
Will a Server.Transfer () break FormsAuthentica tion? When getting into
the aspx that requires authentication, I see the Cookies are created,
but User is null.
Also, I have merged the authenticaiton code in the branch of the
IHttpModule that performs the potential Url remapping and I do the auth
stuff in that branch.
Any info is appreciated.
Here is my code to create the ticket/cookie:
=============== =============== =============== =
void CreateUserCooki e(string UserID)
{
// create the new ticket
FormsAuthentica tionTicket ticket = new
FormsAuthentica tionTicket(1, UserID, DateTime.Now,
DateTime.Now.Ad dMinutes(40), false, "roles",
FormsAuthentica tion.FormsCooki ePath);
// encrypt the ticket
string encryptedTicket = FormsAuthentica tion.Encrypt(ti cket);
// create an authentication cookie
HttpCookie ticketCookie = new
HttpCookie(Form sAuthentication .FormsCookieNam e, encryptedTicket );
_context.Respon se.Cookies.Add( ticketCookie);
}
=====
After this, I also do a Response.Redire ct back to the same Url, with
this being skipped this time by an IF, then Server.Transfer to the
generic aspx loader page that uses WebPart classes dynamically.
I got this working. I had to create a FormsIdentity based on the
FormsAuthentica tionTicket then use that to create a GenericPrincipa l
and attach it to Context.User. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Shaun |
last post by:
I am trying to import a webpart that has been developed as a standalone
project - single webpart class in an assembly.
I've read up on the web (Fredrik Normén's Blog etc) that it is possible to
import a web part by providing a .webpart file and having the assembly dll
copied to the /bin folder (or in the GAC).
This got me excited as it is just what I am after - delivering a portal
application and allowing others to develop and import...
|
by: Danny Tuppeny |
last post by:
Hi all,
I'm after some advice...
I'm building a website which will have a login etc.. The Personalization in
asp.net 2 stuff looks like it'll save me some time (login controls etc.),
however, the rest of my site ties very intimately into my users. I have many
tables (such as News, PhotoGallery, ForumPost) which have a UserID column.
From a user, I want to be able to get at a List<News>, List<PhotoGallery>
etc.
|
by: CBretana |
last post by:
Is it possible to programmatically control the WebPartManager without being
on a web page? I need to write a C# console app that will cycle through a
set of objects and for each one, generate (for storage) the binary byte array
that the WebPartManager would create for a certain web part configured
dynamically, based on attribute values of that specific object ..
--
Charles Bretana Jr.
Arete Industries Inc.
|
by: SlimFlem |
last post by:
I am new to the WebPartManager stuff and am still learning how to set
this up properly. I am creating instances of WebPart classes from
loaded DLLs and add them to the Page's WebPartManager. If I don't have
this property set on the WebPartManager:
Personalization-Enabled="false", the page will hang and not load. If I
do have this, then I get the following exception:
===
System.InvalidOperationException was unhandled by user code
|
by: Bill Mild |
last post by:
Has anyone gotten the new Portal Framework in ASP.NET 2.0 to work in
conjunction with <anonymousIdentification enabled="true />? I get this
error...
Personalization is not enabled and/or modifiable. The Enabled property must
be set to true, and a registered personalization provider must be selected.
The current user must be granted the right to modify personalization state.
| |
by: Prashant Majhwar |
last post by:
I have created sample web Application. On the default page I drop
webpartmanager control and then create a table and place webpartzones. Now
when i am running it in development mode ...everything runs fine.
But when i publish the website and try to run....error pops up
Webpartmanager is undefined....what is happening ????
can anyone please help.....
Thanks
PM
|
by: milmus tender |
last post by:
Hi,
I hope, that I post in the right newsgroup. Please tell me if not.
I use the WebPartManager technology of ASP.NET 2.0 without sharepoint.
I want to set per server side code a webpart as editable.
I´m able to set the webpartmanager in edit mode. Than each webpart gets a
new verb called 'Edit'. When the user clicks to the verb in the browser of a
webpart, then this webpart is the selected webpart in webpartmanager and the
|
by: Ya Ya |
last post by:
I am using the personalization feature in asp.net 2.0
I am storing the phone number for each user.
When a certain user enters his phone number I would like to check if another
user already store this phone number.
Is it possible to query personalization data so I will be able to retrieve
the phone number of each user?
|
by: john20 |
last post by:
Hi All,
I am trying to use webpart in my page for that i am putting webpartmanager and webpartzone.
but as soon as i am putting webpartmanger in the page it is giving me below error, let me tell you i have installed Sql server 2005 on my machine.
after installing the Sql server 2005 it has started giving me this error. if i remove webpartmanage from the page then it works fine.
and i am not making any database connection then also it...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |