|
Dear Friend!
My Problem was in Mozilla, Chrome and IE8. in IE7 and IE8 Compatibility mode i haven't problems.
i added
<div style="clear: both;"> </div> to the end of my parent div, it works correctly!
Thanks for your solution.
Cheers.
M. Ghiasi
|
|
|
|
|
You are most welcome bro...
|
|
|
|
|
Hi all, I'm publishing a small site developed in ASP.NET where I retrieve the user name with the foillowing command Server.HtmlDecode(User.Identity.Name). On debuf mode is working fine, but as soon as I publish it (IIS v6.0) that value is empty.
Can someone help me to setup properly the IIS?
Many thanks
Ralph
|
|
|
|
|
Which authentication mode are you are using in IIS ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Thanks for your quick response.
I'm using Annonimous authentication
|
|
|
|
|
rljurado wrote: I'm using Annonimous authentication
You need to select Windows Authentication Mode.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Why this message down voted ? I guess the person who asked the question voted 5 a few hours back. But now some one down voted it, What is the reason behind it ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I think some people envy your lovely work you are doing in this forum. Ignore it... I upvoted you buddy...
|
|
|
|
|
I know this type of guys who don't know how to help and dont encourage..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Thts Not hte Answer Abhi is Looking For?
R u using Windows or forms or passport?
rljurado wrote: I'm using Annonimous authentication
If You are going for anonymous access .If it is forms authentication the name will be empty my friend..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
sashidhar wrote: Thts Not hte Answer Abhi is Looking For?
I was looking for that only . I just wanted to know which Authentication he has used on IIS.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
modified on Thursday, November 26, 2009 10:19 AM
|
|
|
|
|
Lol I am Wrong..!
I thought he is Asking for Authentication in asp.net..!
I came to Know Now he is asking in IIS..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Thank you both, but I might be missing something and I don't know what I am doing wrong.
On my web.config I am using <authentication mode="Windows">
On the IIS Authentication there are 3 options
- Annonimous (this is the one enabled so far)
- Forms
- ASP.NET
What should I do?
|
|
|
|
|
rljurado wrote: On my web.config I am using
What you are using over web.config. I guess some text is missing over there.
rljurado wrote: On the IIS Authentication there are 3 options
- Annonimous (this is the one enabled so far)
- Forms
- ASP.NET
In IIS there should have Windows Authentication. You need to select it.
For learning more about IIS, please read this article:
Beginner's Guide : Exploring IIS 6.0 With ASP.NET [^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
User.Identity.Name will be null if no user is logged in (depends on the Authentication mode).
|
|
|
|
|
Good Afternoon,
I am new to ASP.NET. I am used to C# windows delveloper. In all my previous projects we had a seperate solution to handle the Data Access Layer. This layer had all the logic for logging in and communicating with the database.
How do I move the Login (currently I am using Memberships that is setup in my config file) to the DAL layer? Should it be in the DAL layer?
Thanks for all your help.
Chris
|
|
|
|
|
Membership having it own internal implementation. If you want to move membership, you can use DAL for all database related code. Even inbetween DAL and UI, you can put the Business Layer also (BLL).
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
You're trying to keep seperation of concerns, as you should. The problem is, Asp.Net web applications are very much dependant on app and web.configs, which don't run in class libraries.
I don't use .Net Memberships. I created my own role-based security model (did this before I started using .Net) and created data providers to go with it. Also, I use a ConnectionProviderFactory (returns an IDbConnection) class to maintain connection strings so my Dals can be completely independant from the applications using them.
There are some useful features provided in .Net but if you require more abstraction and extensibility you sometimes need to break-out a little.
|
|
|
|
|
Hi
Thanks for your input.
Is it really worth going through all the trouble to implement a DAL layer? What is the cons of creating your own role-based security model? And how much work are we talking about. I am fairly new to ASP.NET. Coded alot in VB.NET and C#. When you did this how many stops did you find along the way?
Thanks
Christiaan
|
|
|
|
|
I have searched the web for articles on how to create a custom membership and provider to move this to the DAL layer and have only find articles that do something simular for legacy programs.
Is this not the right patht to go along anymmore?
|
|
|
|
|
DALs are still very popular and play a big role in n-Tier design. It's all about seperation of concerns/code maintenance: Your GUI code and your business logic code don't need to understand the database; they don't need to understand SQL, so abstract this kind of code.
There are some really useful, really cool things in .Net but in my opinion, a few of them ignore good practice - putting connectionStrings in the application is one of them. However, it does depend on how scalable your application needs to be. If your app. consists of a couple of forms for a HR dept to add new staff, and isn't likely to grow much then I'd say...yeah...go with .Net Membership and don't concern yourself too much about design patterns, stick your db properties in the app.config/web.config.
It's all about context really. What kind of application are you working on? Is this a team project or is it an app you're doing on your own?
I'll see if I can find some detailed articles for you.
|
|
|
|
|
Hi
I agree that placing connection strings in the UI's config in not a very good practice to persue. My project currently is small and it is only me that develops it. But over time it can grew to a couple of 1000 users and we will have to get in other developers.
The whole membership works cool with roles and everything. I will appreciate the articles. Thanks
|
|
|
|
|
I have to validate SSN which will be entered in 3 different textboxes (txtSSN1, txtSSN2, txtSSN3).
1. If SSN1 is entered and other TWO textboxes are left blank, then CustomValidater should raise an error.
2. If all 3 textboxes are blank, then is a valid scenario. return true and save.
3. If all 3 textboxes are entered with values, return true.
As I have these controls in a Repeater, I cann't able to find the controls from clientside. Need help
Regards,
Ravi K. Kalyan
|
|
|
|
|
You can validate on OnItemDataBound event of repeater.
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
What is the problem with that. Repeater actually places the same html that you define in ItemTemplate and AlternateItemTemplate .
You can easily use OnItemDataBound event to find the controls. Inside it write like this:
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternateItem)
{
TextBox tb = e.Item.FindControl("yourserversideiD");
tb.Attributes.Add("onblur", yourjavascript);
}
Like this way you can easily find any serverside control inside Repeater and apply your javascript.
so try this out..
|
|
|
|