Working hard to enrich millions of peoples' lives
I am Co-founder and CTO of Pageflakes - Web 2.0 AJAX Start Page, acquired by LiveVideo (founded by MySpace founder)
My Book
My Reading Page www.pageflakes.com/omar
My Profile
Read my blog on:
My Website www.oazabir.com
The solution I have shown here is already in use at Pageflakes. So, you can trust that it works well.
Tim, we want to change the user name and let the regular login process work as it does.
An interesting find from Omar. Especially important for you ASP.NET 2.0 developers if you do any work
New indexes slow down INSERT,UPDATE,DELETE because there are additional index to update. It's better to have least number of index but have the best possible use of them.
PingBack from http://www.aspnettricks.com/archives/forms-authentication-failed-for-the-request-reason-the-ticket-supplied-was-invalid/
I have been awarded MVP Award 2007 on Visual C# again. This is my second year. This time the gifts are...
I have been awarded MVP Award 2007 on Visual C# again. This is my second year. This time the gifts are
Misho bhaia...its an excellent post. Thanks for sharing :) Wish you will have more bright days coming in your near future...Good Luck Bye BYe..:)
Regards,
Samiha :)
Bro,
as far i can remind i heard few points from your own mouth ... :)
i am really proud of you... i saw a guy who blinks on the sky ..... you really inspiring me....
cheers :)
I couldn't have said it better than Omar - How to become a really experienced developer overnight
Ha Ha Ha, Great Article Indeed. Simply awesome. I specially liked the part where you differentiate the developer skill. Kudos..
Omar, I think in your case it must be: "Work 18 hours per day, 7 days a week, 360 days a year for 13 years AND be a genius".
I look forward to wake up tomorrow morning :-)
Inspirational. It will help a lot of developer who are in different stages in their career. Thanks for sharing!
woW, a very good article, I have been looking all ur article. They are really good.
You've been kicked (a good thing) - Trackback from DotNetKicks.com
This behavior has to be due to the server-side implementation of the Atlas libraries. The HTTP response code 100 (continue) is not 'required' simply because of a post (per HTTP RCF) - some server's choose to return this, some don't (usually due to code / configuration).
Here's a simple test: Whip up your own AJAX implementation using one of the many XmlHttpRequest patterns out there, and hook up an HTTP sniffer (preferably on a box WITHOUT the Atlas extensions). The calls are quick and concise - 1 POST, 1 response (hopefully a 200!!!).
Simpler test: Hook up a standard POST form to a server without the Atlas extensions - still no double hit.
I can reproduce these results on any machine I have available, and all the big libraries out there give the same results (Prototype, BackBase, etc.) yield the same results.
HTH,
Mike
To add more info about the PageMethods, in Beta 2, the PageMethods work only if you have placed the code in "in-line" page (in .aspx, not in .aspx.cs).
Check http://forums.asp.net/thread/1459613.aspx out for this bug.
Just my $0.02!
Can you elaborate more on this statement:
"However, Http Get does not allow you to pass objects as parameters. You can pass numeric, string and date only."
Thanks!
Zen
Using HTTP GET for web service in ASP.NET AJAX Beta 2 doesn't seem to work, has anyone else found this?
Good stuff...especially the bullet point starts with "I have seen the following evolutionary...".
Quite an observation!
This is a really great article, many thanks for spending the time sharing this info.
EveryOne saying good stuff , inspirational , ok , fine its good to know how you did all these things but my question is how to motivate yourself that you have to work 18 hours per day , dont take any thing for granted , i really appreciate your work , reading post by good chaps , hanging around into msdn, codeproject , asp.net n etc , but to survive you have to earn something , They say gain information its knowledge by knowledge you gain power and by power you rule. I am trying hard to get the information and turning it into knowledge of mine and now most important phase is to really utilize my knowledge.
I again really appericate you the way you answer my question in a very concise way, but tracking down all those stuff isnt it that tough and above all its the company where you work not allowing you to open up your mind ,yes i do agree with your point start your career with some small companies to gain extra things where your thinking never stops and good company just makes you another donkey in their company , my use to say coding is nothing more than donkey work around so thats true , real stuff is how to go for the problem or solution.
Prays and Motivation again anticipating from your side and will welcome any good way of tracking down all stuff from your side as well as your pals around here. !
Thanks. Mail me if you have some Intermediate+ work of yours , means some good learning stuff i hope that will really help me out. Contact me at Coolrah@gmail.com.
Best wishes with and may ALLAH be blessful and merciful to all of us . ALLAH HAFIZ
Can you help me here: http://forums.asp.net/1470075/ShowThread.aspx ?
Shame I missed this one at the time.. :)
This problem always was a classic in javascript i.e. closures get executed in global scope - but the workaround is this:
function SampleClass()
{
this.id = 1;
this.call = function()
var obj = this;
PageMethods.DoSomething( "Hi", function(result)
debug.dump( obj.id );
} );
}
I feel like it's 1999 again ;)
Hi,
Its very easy to say that One has to work 18 hrs. I am really proud that we have guys like you in the sofware field. I haven't seen a committed guy like you.
I donn have to say keep up the good work as I am sure that you will always do that.
Wow excellent article by Omar Al Zabir ! Atlas provides you batch call feature which combines multiple
Hi, the http 100 status code will only give the client an indenticator that the server is ready to retreive big data. Not every post will return an http 100.
Next you can submit the same data using GET like you can do with an POST request, there is no difference.
The difference between POST and GET:
- POST will not be cachable in browser or proxy
- GET has a maximum length of X bytes (where X depends on the web browser and the number of fields you want to send)
Michael
http://www.ajaxpro.info/
Look at my blog where I'm writing about mistakes in AJAX applications. You should never run more than one request at the same time. Not only AJAX requests are queued because of the 2 concurrent http connections restriction, think on mouseover images!
I did a HTTP POST and here's the output from ieHTTPHeaders plug-in:
--------------------
POST /CoreServices.asmx?mn=SavePage HTTP/1.1
Accept: */*
Accept-Language: en-gb,en-us;q=0.5
Referer: http://www.pageflakes.com/
Content-Type: application/json
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; FDM; InfoPath.2; .NET CLR 3.0.04324.17)
Host: www.pageflakes.com
Content-Length: 102
Connection: Keep-Alive
Cache-Control: no-cache
{"pageData":{"id":????,"index":6,"title":"Test","columnCount":3,"columnSizes":["33%","33%","33%"]}}
*** HTTP/1.1 100 Continue ***
*** HTTP/1.1 200 OK ***
Cache-Control: private, max-age=0
Date: Sun, 19 Nov 2006 07:46:56 GMT
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Content-Encoding: gzip
Vary: Accept-Encoding
Transfer-Encoding: chunked
-----------------
You see, there are two response. First HTTP/1.1 100 Continue and Second one is the HTTP/1.1 200 OK
From W3C.org HTTP specification, here's what I found:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html
8.2.3 Use of the 100 (Continue) Status
The purpose of the 100 (Continue) status (see section 10.1.1) is to allow a client that is sending a request message with a request body to determine if the origin server is willing to accept the request (based on the request headers) before the client sends the request body. In some cases, it might either be inappropriate or highly inefficient for the client to send the body if the server will reject the message without looking at the body.
Requirements for HTTP/1.1 clients:
- If a client will wait for a 100 (Continue) response before
sending the request body, it MUST send an Expect request-header
field (section 14.20) with the "100-continue" expectation.
- A client MUST NOT send an Expect request-header field (section
14.20) with the "100-continue" expectation if it does not intend
to send a request body.
Because of the presence of older implementations, the protocol allows ambiguous situations in which a client may send "Expect: 100- continue" without receiving either a 417 (Expectation Failed) status or a 100 (Continue) status. Therefore, when a client sends this header field to an origin server (possibly via a proxy) from which it has never seen a 100 (Continue) status, the client SHOULD NOT wait for an indefinite period before sending the request body.
Requirements for HTTP/1.1 origin servers:
- Upon receiving a request which includes an Expect request-header
field with the "100-continue" expectation, an origin server MUST
either respond with 100 (Continue) status and continue to read
from the input stream, or respond with a final status code. The
origin server MUST NOT wait for the request body before sending
the 100 (Continue) response. If it responds with a final status
code, it MAY close the transport connection or it MAY continue
to read and discard the rest of the request. It MUST NOT
perform the requested method if it returns a final status code.
- An origin server SHOULD NOT send a 100 (Continue) response if
the request message does not include an Expect request-header
field with the "100-continue" expectation, and MUST NOT send a
100 (Continue) response if such a request comes from an HTTP/1.0
(or earlier) client. There is an exception to this rule: for
compatibility with RFC 2068, a server MAY send a 100 (Continue)
status in response to an HTTP/1.1 PUT or POST request that does
not include an Expect request-header field with the "100-
continue" expectation. This exception, the purpose of which is
to minimize any client processing delays associated with an
undeclared wait for 100 (Continue) status, applies only to
HTTP/1.1 requests, and not to requests with any other HTTP-
version value.
- An origin server MAY omit a 100 (Continue) response if it has
already received some or all of the request body for the
corresponding request.
- An origin server that sends a 100 (Continue) response MUST
ultimately send a final status code, once the request body is
received and processed, unless it terminates the transport
connection prematurely.
- If an origin server receives a request that does not include an
Expect request-header field with the "100-continue" expectation,
the request includes a request body, and the server responds
with a final status code before reading the entire request body
from the transport connection, then the server SHOULD NOT close
the transport connection until it has read the entire request,
or until the client closes the connection. Otherwise, the client
might not reliably receive the response message. However, this
requirement is not be construed as preventing a server from
defending itself against denial-of-service attacks, or from
badly broken client implementations.
Requirements for HTTP/1.1 proxies:
- If a proxy receives a request that includes an Expect request-
header field with the "100-continue" expectation, and the proxy
either knows that the next-hop server complies with HTTP/1.1 or
higher, or does not know the HTTP version of the next-hop
server, it MUST forward the request, including the Expect header
field.
- If the proxy knows that the version of the next-hop server is
HTTP/1.0 or lower, it MUST NOT forward the request, and it MUST
respond with a 417 (Expectation Failed) status.
- Proxies SHOULD maintain a cache recording the HTTP version
numbers received from recently-referenced next-hop servers.
- A proxy MUST NOT forward a 100 (Continue) response if the
request message was received from an HTTP/1.0 (or earlier)
client and did not include an Expect request-header field with
the "100-continue" expectation. This requirement overrides the
general rule for forwarding of 1xx responses (see section 10.1).
So, I assume may be my Proxy is doing that HTTP 100 or may be IIS 6 is sending HTTP 100 always.
Hi Omar, as far as I've tested appending the expires header is enough for the response to be cached on the client, isn't it?
It does not work in Webservices.
Excellent post Omar Bhai! I must suggest everyone to read it :)
great article :)
Thanks for sharing this with us. I have seen your website and it just blew me away. You rock!!!!
Dude! it's a great article, thank you very much.
Hi, thanks for sharing this ! I have been watching your blog for some time now as noone else gives out such valuable information on Atlas internals.
The two fixes you show for handling timeouts and client calls queueing limitations mean modiying the code MS provides. Have you had any feedback from them ? I'm working on a high traffic web site scheduled for openning in february I wander whether we should apply these fixes or wait for some official patch. Based on your experience, how stable is this ?
Hi Damien,
I have implemented the same principle on Atlas CTP version. It works there well enough as we use it in Pageflakes. I have just ported it to the new Ajax Beta version. As far as I have tested it works fine.
May be you can deploy it on your beta server and ask your QA team to do some load testing internally?
OK, reading your new post on CodeProject I see why web services via get didn't work in ASP.NET AJAX Beta 2. You need to set [ScriptMethod(UseHttpGet=true)] and [WebOperation(true)] is no longer necessary.
Could not resist posting. A cool article passed by a friend - Mourad Askar. ...
Hi Omar, great article and congratulations :)
In you article though you say that a POST is causing a second roundtrip due to the HTTP 100. Actually 100 is an informational response and it's part of the same transaction.
Keep up with the great work!
This is awesome man. Well done!
Excellent Misho bhaia,
..After a long while I found the same voice like my father……When I stared my carrier he told me almost the same thing……
Then also Thx 2 Espen warendor …. 4 the link…
Gud Luck
Muntasir
Do use additional Indexes, if the architecture of your app makes it easy for you to utilize other columns for any of the functions stated above.
The additional cost of additional index for dozen thousand of these functions will be negligible.
Hi!
pageflakes is a great website with great functionality, but I have a little question:
How did you made those collapse buttons? Did you use collapse panels or what. I've been trying to do one of those for quite a while but I didn't managed to do it.
Thanks a lot! and please excuse my poor english
Hi SirSummeR,
Which collapse button are you talking about?
Omar,
Presumably the Pageflakes code base is quite large. Have you considered using the Web Application Visual Studio project, rather than a website 'project'?
Matt
Good idea! Must try it soon.
As far as I remember "Web Application Projects" does not validate web pages at all.
We do not use Ajax Control Toolkit yet. These are custom made. Idea is to toggle visibility of a DIV based on a click on those buttons. That DIV contains the body part.
At tagworld we use web application projects, and all non page code is in separate DLL projects.
For web pages validation we are using asp_netcompiler as post-build event.
We also wrote special studio plug-in for resourses validation.
The build time is about 30 sec from studio and 15 sec from command line.
it's about 350 000 LOC for html / js / cs / aspx / ascx files and all the static content
Great! Thanks Alexander for the suggestion. We definitely need to try this ASAP on our project.
Just checked TagWorld. It looks like a serious competition to MySpace!
Thanks a lot! I did it using css and div. it wasn't so hard after all:)
You know...there is the French version of pageflakes. it's called netvibes.com. But I don't know which one was the fist on the web.
Great job!
good
thanks
It's good you work so much and you are probably a very smart person too but working so much does not give you enaugh time to enjoy life. For me, I work so that I can earn money to be able to follow my passions, but I still like to have some time to spend with a beatifull women or do something fun.
Why do you work so much ? Probably not for money ? I think there is something wrong with your brain, but... guys like you push society forward so... thank you !
total commander is really a magical kit :) once i start using it really change my working style :) thanks for intro this with all of us :)
and u find very nice step to solve ur problems :) bravo :)
regards,
samiha
如何一夜之间成为一个牛B的软件开发者?
Pageflakes 有这么大吗?需要20-30分钟 太恐怖了吧 你的机器破?
译/转自 http://msmvps.com/blogs/omar/archive/2006/11/09/How-to-become-a-really-experienced-developer-overnight.aspx...
Torrie Wilson in a thong
http://torriewilson.cn.to
May i use your article on my new Microsoft supporting weblog/forum/discussion/news site? Alot of my visitors will be interested in using the asp.net framework as well as the atlas.net framework. Of course the "read more" will continue towards your site. Let me know, thanks.
Omar, You are the star..
Wish I could be like you one day...
Henry
Is there anyway to increase the concurrent http connections limit? What are the down side of it if we increase it? Anyways, it's bad idea to call more than 2 requests at a time but when you deal with long running webservices (which takes more than 2-3 seconds), I wonder what else can be done!
Omar...
I just tried to pull out all my code files from the App_Code folder, and putting it in an external class library project.
My website response is much slower then if the code is inside the App_Code folder.
Have you or others experienced that?
Greetings
The behavior comes from a limitation within WinInet and as far as I know there is no fix, except using another component ;-)
As far as I know, a 2 connection limit is suggested in the HTTP/1.1 specification.
I think it can be raised by the user through a registry setting, but there is a reason for setting it to 2: it is a balance between network load and webserver load combined with the fact that using 1 connection would show the stalls all the time, while with 2 there is at least a way to bypass a large request.
Marijn
BTW: Opera has the connection limit set higher ( 4 or 8, I do not remember), Firefox also defaults to 2 (for HTTP/1.1, I think it is 4 for HTTP/1.0)
BTW2: Using HTTP pipelining, at least the start can coincide with a previous download
You should be able to make more than two calls on a web page at a time by using subdomains (e.g. calling images.pageflakes.com), be careful about security errors with any Javascript though. Caleb Jenkins from Microsoft can/will confirm this.
great work :)
Another great article!!
Awesome work!! :)
torrie wilson in a thong
http://myblog.es/torrie-wilson
See my post here on how to raise the 2 concurrent request limit: http://jaysonknight.com/blog/archive/2004/06/04/277.aspx
Main post is for IE, there is a comment on how to do it in FF.
Very informative, thanks.
Since IIS 6 dynamic compression is CPU intensive due to lack of caching, i use .NET compression libraries to compress and use the Cache.VaryByCustom property on the page to choose the appropriate output. All this gets abstracted into the base page class.
Is there any specific reason why you wouldn't prefer this solution?
omg !!!!
its really big alert for me too. thanks :)
you should mention "So, what we learn from here?"'s source, which is MSDN !! it's seems like they don't do what they are learning us!
This is no longer true in ASP.NET AJAX RC 1.
[WebMethod]
[ScriptMethod(UseHttpGet=true)]
public static string PageMethodTest(string name)
return String.Format("Hello {0}", name);
works absolutely fine and it can be in the code behind file (as opposed to inlining bug in Beta2).
Hi Omar,
You seriously have the best articles I have ever seen written by a developer...anyways, I am wondering what the difference is between using static or virtual...I notice that you use virtual above. What do you know about using static methods and what are benefits of making something virtual??
Thanks,
Greg
static and virtual are very much different. Static means global things which are not dependent on instance. Virtual means you allow the function or property to be overriden.
Thanks for the response, that makes sense...Is the above method still the best way to access the Profile properties from a web service?
P.S. I am going to invite you to chat over GMail...my email address is gpbenoit at gmail dot com.
excelent!
happy holidays!
I was trying a couple a days ago in IE7 search box (set up to live.com) to type "<nunit2>" as a search criteria and the live com crashed :)
Try it for yourself :)
http://www.live.com/?q=%3Cnunit2%3E
thanks for a useful piece of article :)
LLBLGen has had projections for some time. Overall it is a more mature tool than Linq that supports a wide set of databases. You should try the eval it will blow you away.
Thomas
Chris:
Thanks, but the exe doesn't work.
"unhandled exception: System.IndexOutOfRangeException: Index was outside the bounds of the array at Crypto.KeyCreator.Main(String[] args)"
----
Try supplying the arguments to the program of: 24 64
You will find that it works fantastically fine.
Great article, I know that feeling very well. Fortunately I don't have to administer my DBs myself anymore :o)
Cheers
Andreas
PS: Happy new Year!
Great Info, but i've heard that deflate is about 41% faster than gzip, any ideias on how to give Priority to that compression? thanks
Browser sends which compressions scheme it wants. Generally "gzip, deflate" is sent which means gzip gets higher priority.
Great Points! Hope that thing not hapenning to Page Flakes again ;)
Omar, I would disagree with you on the last point on your recommendations.
For starters, your sysadmin didn't do a professional job and the business cannot spend time, money & resource to provide a babysitter to ensure the sysadmin doesn't screw things up.
One of the fundamental issue here is Disk Space management. You shouldn't have to delete files to free up disk space. If a business is growing and there is need for proper infrastructure to be in place (ie. Server HW/SW Spec) then it should be addressed first. Also the database should be configured for better disk space usage (ie. auto shrink, log file truncation etc)
Also instead of daily mid-night backups, hourly incremental backup should be considered.
This would have saved time & money for your organisation.
Oh, God save us. Live.com crash too.
Bye
Loads of thanks to share that GREAT work.
You definitely deserve more than a vote, where is the Paypal button ?
Another great article by Omar Al Zabir . After sharing his tips and tricks about networking with ASP.NET
The work is a stamp of authority.Well done I will do my best works on pageflakes community as well.
Best Regards
Udai.m
Couldn't agree more with the last commenter's final point. Why don't you have hourly back ups of something so critical to your business?
This is really good! Although I am staying away from intergrated AJAX in ASP.NET (and veering towards things like jQuery), I think this is a good example.
Its simply an excellent Article :) thanks and congrats for your excellent work :)
It's Great!!!!
Excellent Article
Introduction
IwillshowyouhowIbuiltastartpagesimilartoGoogleIGin7nightsusingASP.Ne...
Misho bhaia....its quite different and inovative project...:) Well done :)
Dear Omar,
hmmm! So you guys are human. you also make mistakes. I do agree with you that there are areas in our daily work where we forget to take proper precautions before touching.
Areas where one should perform wudhu and take off shoes before attempting to handle.
Thank you for sharing these thought with us human.
Regards
Ghazi Wadi
PMP, ASQ SSGB
Good, Is there any method to make the application not sending an email but Make HTML File on C:\Temp e.g.
Thanks
Amazing and inspiring! Vote was cast and Paypal button nowhere to be found...
YOU ARE A GENIOUS
omar this is good information.
Just a question: by looking at your own page, do you manage to use all that stuff you did as a "normal user" does, or can you prevent yourself not to think about all the plumbing behind, as a "normal developer" dont ? :)
I do also wake up in the morning and go thourgh my pageflakes :):)
http://www.pageflakes.com/verdina.ashx
me too haha~
http://www.pageflakes.com/erickdu888.ashx
It would be nice if there was feature that helped me to import some of your flakes in my page.
Thanx for answering all these questions
Your Bubblez is an advanced Ajax-based windows similar (but nicer) to the continuous growing number of Ajax start pages, like Google Personalized, etc. It is organized into bubble spaces (Tabs) with associated bubbles that could be fed with content from any URL. check http://www.yourbubblez.com/.
I will do my best to be an advanced++ :)
Really thank you for showing us the track of how to become something special in this world..
Yes, import feature would be nice. Especially for the Digg PageFlake. Is that a custom PageFlake???
You can easily add the Digg flake by clicking "Add Flake" and selecting the "Digg" flake from the list.
Also the Pageflakes community has 136 more flakes.
that's really wonderful for me :) I am trying to add my blogs with my PF :)
thanks :) its really great feature for me and my blogs :) I m trying to add flakes in my blog :)
I just love this feature. Its cutting out lots of my work :)
This is the best feature of Pageflakes at User End, I think. Any doubt?
indeed great feature. But it BEGS for ability to resize (notepad widget for example)
I was able to delete the two files from the box.net flake, does it appear removed only for me or is it globally reflected? It was not intentional, i was just checking out each flake and happened to meddle with box.net flake.
If it is global, then this is a bug.
如果你既想学习 ASP.NET AJAX ,又想学习 Windows Workflow Foundation ,还想学习 LINQ (包括DLinq和XLinq),能够一次过满足你三个愿望的除了 Kinder出奇蛋
Hi Omar Great Job
cornflakes in the morning is my old habit, pageflakes my new
This is indeed , some to think about. One thing I would like to add :-
When SQL update statement is consists of foreign key modification, the extra execution path is generated because of validating the foreign key, and finally combining it up to the main table.
But, if we remove the foreign key, the extra branch is no longer generated. Now, if data-access layer ensures 100% accuracy of passing valid keys, then I guess, it is possible remove the unnecessary foreign key references that cause the SQL server do some extra logical operation.
Happy coding!
为了让自己在迷惘的时候做出正确的选择,我转载了它:Howtobecomeareallyexperienceddeveloperovernight
Good post. I would just point out that to get this to work in a web application project (VS2005 SP1), the inherits attribute of the provider element needs to be a full type specification, as the UserProfile class will be precompiled into the project output assembly.
ie
<provider inherits="MyProject.MyComponents.UserProfile, MyProject" />
sorry typo, should be profile element not provider element...
Nice tip, Omar.
In one of my recent projects where I could not use stored procedures I did it clientside like you can see in the code I've pasted below.
I keep a dictionary of the dirty fields on my entity and use it to generate the field = @value pairs in the update command.
How could one provide the same flexibility in T-SQL without creating tons of stored procedures?
Btw. congratulations for being editor's choice on codeproject :-)
internal SqlCommand GetUpdateCommand()
SqlCommand cmd = new SqlCommand();
cmd.Connection = GetConnection();
StringBuilder sbValues = new StringBuilder();
// in case of update we need the id which is not in the changedFields dic
cmd.Parameters.AddWithValue("@" + PrimaryIdColumnName, ID);
// loop through the changeDictionary and build strings to use in the SQL string.
// also add parameters to the sqlcommand
foreach (KeyValuePair<string, Object> kvp in changeDictionary)
sbValues.Append(kvp.Key + " = @" + kvp.Key + ", ");
cmd.Parameters.AddWithValue("@" + kvp.Key, kvp.Value);
cmd.CommandText =
string.Format(
"UPDATE {0} SET {1} Edited = GETDATE() WHERE {2} = @{2}; SELECT * FROM {0} WHERE {2} = @{2}",
TableName, sbValues.ToString(), PrimaryIdColumnName);
return cmd;
There's an overhead of change dictionary. For each object, there's one dictionary. So, it actually takes 3x more memory than simple objects.
Instead of dictionary, you can maintain an array of boolean like:
if( obj.IsChanged[0] )
Update field 1
Thank You For These Advices And I Hope To be Like You
PingBack from http://eurovalley.net/netvibes-competitor-pageflakes-steals-yahoo-exec.html
It's really a great news to be excited enough! Best wishes for PageFlakes (Y)
Any suggestions on how to do this using PHP?
I am trying to accomplish the same thing, but using Apache and PHP. Thanks!
congrats :) its really brilliant news..:)
I use the following query to update the username:
UPDATE aspnet_Users
SET UserName = @NewUserName, LoweredUserName = @NewLoweredUserName
WHERE (ApplicationId = @Original_ApplicationId) AND (LoweredUserName = @Original_LoweredUserName)
Works almost fine. It does update the username, but it also creates a new entry in aspnet_Users with the old username. It doesn't create anything in the aspnet_membership. I don't want to create a new user and copy the old values since I reference the UserId. Any ideas why it creates a new entry with the old username?
ASP.NET Issues a cookie with the user name. So, next time when a request hits with the specified cookie, ASP.NET creates a row in aspnet_users table.
Your step #47 indicates that failover is automatic. A log shipping configuration does not automatically fail over from the primary server to the secondary server. If the primary database becomes unavailable, any of the secondary databases can be brought online manually. Only database mirroring can do that using a witness.
Is there any way to prevent this?
TIA
I think I solved it by looking at some of your code at the top.
Immediately after updating the username, I log the user out and in again:
FormsAuthentication.SignOut(); HttpContext.Current.Session.Abandon(); FormsAuthentication.SetAuthCookie(newUserName, true);
Best wishes for PageFlakes.
Keep glowing.
Fine! It’s obviously a great news/achievement for faster growing on side of popular and essential start page.
Keep it up.
RandomClippings栏目已经有一段时间没有更新了,主要是因为一直没能挑选到适合的文章推荐(有可能是因为这段时间我读英文文章少了,哈哈),这次一定要好好补上,推荐两篇好文章给大家。
你真的...
Random Clippings 栏目已经有一段时间没有更新了,主要是因为一直没能挑选到适合的文章推荐(有可能是因为这段时间我读英文文章少了,哈哈),这次一定要好好补上,推荐两篇好文章给大家。 你真的懂UPDATE语句吗
omar,
can this technology be implemented when u open a popu window...
<div id="blockUI" class="translucent" style='display: none; background-color: gray;
width: 100%; height: 100%; position: absolute; left: 0px; top: 0px; z-index: 50000;"
onclick="return false" onmousedown="return false" onmousemove="return false"
onmouseup="return false" ondblclick="return false">
</div>
how to use this above code./...
can u explain me in detail regarding it
thanx
jeebu
my requirement is like when opening a popup background should go grey fade...
Thanks a bunch, this was very helpful to me, saved me loads of time in the Reflector :)
Hm.. that didn't do it afterall. How do I delete the ASP.Net cookie for the old username?
The press release states that Pageflakes was founded in Germany in 2006. What's up with that?
hello, hope you will win again...:) my votes will be must there for such an informative article..:)
thanx for sharing omar.
But the website seems to be dead.
Check them out.
Article is very useful to me.
with regards,
sathesh pandian
sathesh@anjusoft.com
I've been busy now for a while to find a way to access the Profile objects from a web service page without using custom classes... and it seem possible after all in the following manner:
// Find the membership user
MembershipUser user = Membership.GetUser("Aram");
if (user != null)
// Create an profile object for this user
ProfileCommon profile = (ProfileCommon)ProfileBase.Create(user.UserName, true);
// You can access the strongly typed profile object here
You got my vote. Hope you win.
Now I solved it! I had to create a ProfileCommon with the new username to prevent a row to be inserted with the old username
Its nice that MS BD is preparing a community site for BD.Oky I think we may get help from that site and related peoples,professionals.I have completed MS Visual Studio.NET.So I wish to work with MS BD by free of cost for 1 month.And I need a certificate for that only.Actually I have to submit a 1 month industrial training certificate to my university.So how can I get offer leter?
touhidul islam,
touhidul_islam_m@yahoo.com
kiit university,
india.
N.B:I am a Bangladeshi nation.And I am an IT student in kiit university,india.
Off course you will be winner
This is clearly a messy way of doing things - and also bad because you've changed the UserId Guid/uniqueidentifier. So if you have any custom personalization or other references in your code (or even in your URLs) to this Guid you have to also manually update all those references.
You're much better off manually editing the aspnet_Membership / aspnet_Users tables, as others have noted.
I know exactly what I went through and open heart surgery it was very scary. When they woke me up to take me off the breathing machine, I was sleeping so hard, I did not want to wake up. Ive never been so thirsty and so much pain. WBR LeoP
Hi Omar
Tanks for solution
But when I used a Group Profile I recived error in setting Property collection , Can you tell me what I do ?
does anyone have a working sample code for updating the UserName without changing the UserId ??
I guess a challenge here is to allow users to change their username (which is also their email address) and keep them signed in.
Please post your sample code if you have it.
germane.
This works for me:
private static object changeUserNameLock = new object();
/// <summary>
/// Change username
/// </summary>
/// <param name="userID">ID of user</param>
/// <param name="newUserName">New username</param>
/// <returns>If successful</returns>
public static bool ChangeUserName(Guid userID, string newUserName)
lock (changeUserNameLock)
bool succes = false;
newUserName = newUserName.Trim();
///Make sure there is no user with the new username
if (Membership.GetUser(newUserName) == null)
MembershipUser u = Membership.GetUser(userID);
string oldUsername = u.UserName;
//get current application
UsersDataSetTableAdapters.aspnet_ApplicationsTableAdapter appsTA = new UsersDataSetTableAdapters.aspnet_ApplicationsTableAdapter();
UsersDataSet.aspnet_ApplicationsDataTable apps = appsTA.GetDataByApplicationName(Membership.ApplicationName);
if (apps.Count > 0)
UsersDataSet.aspnet_ApplicationsRow app = apps[0];
//change username
UsersDataSetTableAdapters.aspnet_UsersTableAdapter usersTA = new UsersDataSetTableAdapters.aspnet_UsersTableAdapter();
int result = usersTA.UpdateUserName(newUserName, newUserName.ToLower(), app.ApplicationId, u.UserName.ToLower());
//if update was succesful
if (result > 0)
ProfileCommon profile = (ProfileCommon)ProfileCommon.Create(newUserName, true);
//ASP.NET Issues a cookie with the user name. So, next time when a request hits with the specified cookie, ASP.NET creates a row in aspnet_users table.
//To prevent this we first sign the user out and then sign him/her in again
//http://msmvps.com/blogs/omar/archive/2006/08/18/108003.aspx
string cookieName = FormsAuthentication.FormsCookieName;
HttpCookie authCookie = HttpContext.Current.Request.Cookies[cookieName];
FormsAuthenticationTicket authTicket = null;
try
authTicket = FormsAuthentication.Decrypt(authCookie.Value);
FormsIdentity fi = new FormsIdentity(new FormsAuthenticationTicket(authTicket.Version, newUserName, authTicket.IssueDate, authTicket.Expiration, authTicket.IsPersistent, authTicket.UserData));
string y = HttpContext.Current.User.Identity.Name;
string[] roles = authTicket.UserData.Split(new char[] { '|' });
System.Security.Principal.GenericPrincipal gi = new System.Security.Principal.GenericPrincipal(fi, roles);
HttpContext.Current.User = gi;
catch (Exception ex)
{ //Log exception details (omitted)
FormsAuthentication.SignOut();
HttpContext.Current.Session.Abandon();
FormsAuthentication.SetAuthCookie(newUserName, false);
succes = true;
return succes;
In my dataset I have a method called UpdateUsername:
Hello,
Can u show the HTML for the div that needs to hold content. i believe the code you stated above just shows the div for the background .
Very nice site! Good work.
Because of this foreign key reads/writes till mysql 4.0 foreign keys were not introduced.
What is your idea about maintaining data consistency by database layer or by business layer of an application?
As an application developer I know my foreign tables and primary tables so while coding the business logic i can take care of the foreign key issues.
Farrukh
Thanks.. I voted for ur article.
Very bad one...try to implement reflection.
Shiva -
How about in ascx files. Previously we had to use AJAXPro.Net in order to make this work in user controls. Is this functionality availble in Ajax.Net 1.0.
Thanks for your response,
Ben
Wow, good stuff ... What kind of hardware does it take to run PageFlakes?
Useful article. Can you please tell me where we can download ACT's dragdropmanager?
Swami
How can you be sure that it was OneCare causing your computer problems?
Very good article Omar, keep up the good work
Hi Swami,
As far as I know, ACT stands for Ajax Control Toolkit ;), just search for ajaxcontroltoolkit
Omar - here's a few more suggestions.
Try using a response filter to enable script compression on your own scripts. By default ASP.NET uses GZipStream which turns out to be slower than the DeflateStream class.
Apparently there are some IP issues with using certain compression techniques with gzip so the .NET folk did not do a lot of the improvements that other gzip algorithms do. Using a 3rd party compression library is much faster with somewhat better ratios than using the .NET libraries.
What also has helped me is preloading web service requests. Atlas CTP had something like this in form of InitialData but it was later removed. It definitely helps out if it is implemented correctly.
AO
Thanks...its great that you aware us...:)
Funny you mention it - I haven't tried it myself since it hasn't been released in a danish version yet, but yesterday I tried the online scanner which you can use for free until Onecare has been released for your OS version.
After an hour or so it crashed and froze IE7 so I had to kill the IE7-process from the task manager. I've been using symantec products for 10 years and I seriously considered to give onecare a try, but I guess you've cleared things up for me :-P
Thx for saving my time :-)
Which product are you using now?
one technique I use in my ajax project is to do client processing to hide/show elements first, then fire an asynchronous task to do the actual stuff, e.g. when minimizing/showing those thingies (what are they called?) it would do it right away (visually)
Hi Eber Irigoyen,
how is possible to do client processing to hide/show elements? Is suppose you are doing it with JavaScript but how can JavaScript minimize some server control?
Well, Microsoft is a lier. See what customers have to say, according to their website;
http://onecare.live.com/standard/en-us/prodinfo/customers.htm
excellent post!
Thank you very much!
Hey Omar,
Long time fan and user of page flakes. I am curious when you first started writing your widgets did you look at web parts and why did you decide to not use them? Thanks,
G
How can we say if the aspx page is compressed using the above compression changes? i.e I can see compressed css or js files but I don't see anyting related to aspx or asmx!
BTW, this config works like a charm.
Rachit
You can see the difference in size with and without compression.
I looked at Web parts end of 2005. As far as I remember, it was quite inflexible and I was not able to make a quick prototype of Pageflakes out of it easily. Moreover, we require 95% of the features to be on client side with Javascript. So, we need a framework which facilitates that. WebParts only gives a very small part of it like Drag & Drop. I also did not find way to get notification of drag & drop on client side and instead of a postback, how to call web service to transmit the data. Besides the multipage feature at the client side is something not supported in Web parts.
In a summary, Pageflakes requires too much facility on the client side which Web parts don't offer. Although web parts is a very nice framework for most of the common need to personalization UI, but not for Ajax Start Pages which are extreme implementation of Rich Internet Application.
Its really very helpful class. Thank you :)
A M$ psychophant talks about DDoS! Joke of the millennium!
Linux psychopath, welcome to my blog :)
I am curious to know how linux protects you from App Level DOS attack. Can you enlighten us with your superior wisdom?
Hi
Ur artical is good. After your artical I am interested to learn ASP .NET, could you tell me the best road map for it or good web-sites?
Thanks in advance
Satya
(issekhar@gmail.com)
PingBack from http://www.sportzia.com/weblog/running/2007/03/25/marbles-for-mulshine-a-community-appeal/
Hi Satya,
You will get many QuickStart tutorials that comes with Visual Studio. If you install MSDN Documentation, you will get many walkthroughs.
The internet is full of beginner articles. Check out www.codeproject.com
You can also try beginner books on ASP.NET.
Why wouldn't you call Response.End() in your validation method itself (if DOS attack is recognized)?
That trick would simplify the code on your pages.
This was really very good stuff
so can I use it on my site which uses sql server 2000 to store the membership details by membership API
Vikram
Omar, just an fyi:
If you are using Crystal Reports (I'm using ver 10.x) and if an aspx is responsible for the PDF/Excel download (e.g http://localhost/crystal.aspx will have response content type = pdf stuff), this compression will NOT work for those pages. So, in order it to work, one will have to remove "aspx" extension from your above code snippet.
Let me know if you know any workaround to this.
Very useful information. Thank you.
How about you use http://localhost/crystal.ashx and remove .ashx from IIS Compression list?
Omar is right. I have used Live One Care on my machine and it really sucked the brain out of my PC.
I dont think and dont recommend it at all for weak hearted people~
yes. very good article.
the drag and drog doesn't work with ASP.NET AJAX V1.0 and AjaxToolkit 1.0.10301.0?
Du musst ein Fachmann sein - wirklich guter Aufstellungsort, den du hast!
Yes it will work on SQL Server 2000 also.
Please answer the previous question- I followed the instructions as closely as I could, in AJAX v1.0, and my panels are not being rearranged. I get an odd behavior (but some behavior) with the floating panel extender, but at least it does something. controls inside of a control extended with the CustomDragDropExtender seem to exhibit no behavior at all.
I like your blogs very much, it is highly informative, You are doing very wonderful things..
I was able to get this example working with latest AJAX v1.0 and the latest toolkit. One problem I was experiencing though, is an infinite javascript loop when I drop a "widget" outside of either column. It seems to be happening in the "getScrollOffset" function somewhere in the toolkit.
Congrats, Omar!
Kudos for you and your team for the great job :)
I see you aim at most popular awards and I beleive you can get them.... Starting from Miss Universe :P :P
Good job!
Thanks for the info - it helps.
I have concern about the scalability of the solution though. Won't it be too much for the ASP.NET Cache to store one entry per user (who is online - which i assume in case of page flakes would be of the order of millions). If I'm correct, your cache will start evicting the older HitInfo (even before the expiry time) as you add new HitInfo to it. You can validate this by having a CacheItemRemovedCallback.
Shiva
i use pageflakes for 5 monthes
wow, This is a great achievement. Keep the good work going.
let me tell you, i'm relly a gr8 fen of pageflakes, using it since 3+ month.
i always enjoy somebody doing great things.
you and your team has done a great job. keep it up..
p.s. i also in touch with other projects you have got in your list.. those are promising too.
best regards,
FM.
Congratulation Pageflakes....
Yes we hope Very Soon Pageflakes will become the number one start up page of this world and I do Believee PF team has the ability to make it come true.
Good Luck and All the best...:)
Nice work, but you already knew that!
The Emmys, Oscars? Who wants that! Your much more talented than any Hollywood actor/artist; therefore, too talented for those liberal awards.
BTW, thanks for sharing your findings/knowledge on Code Project.
Peace...
Great post - I also really appreciate Aram's comments, as they helped me do all of this without any custom profile classes - got it all down to just a few lines of code (since the page I'm using assumes the user is logged in and has a profile)
Private Function GetCurrentProfile() As ProfileCommon
Dim UserName As String = HttpContext.Current.Profile.UserName
Dim User As MembershipUser = Membership.GetUser(UserName)
Dim profile As ProfileCommon = ProfileBase.Create(User.UserName, True)
Return profile
End Function
This VB.NET function returns a ProfileCommon object complete with all the custom settings defined in web.config.
Why don't you stop ONLY posting about the prizes you win and share some code with the community?
Hi Vlad, You will find max 2% post about Pageflakes awards and 98% about codes in my blog. Check out the whole archive how much I have for you already.
In my DropThings project, I have used Workflows to develop the business layer that run synchronously
PingBack from http://homeforsaleblogs.info/synchronously-execute-and-get-return-parameters-from-workflow/
Hi Omar - once again, fantastic post. I am getting an error when trying to add CustomFloatingBehavior to each of the widgets in the _initializeDraggableItems function.
It's causing an exception which states that 'type' (ie CustomDragDrop.CustomFloatingBehavior) does not derive from Sys.Component.
Just not sure why it would be doing this - is this an indication that it just can find the script file or could it be something else? The script file is in the same class lib as CustomDragDropBehavior.js and it makes it into this fine.
Any ideas?
By the way. add a FloatingBehavior extender by itself does not produce the error, only when you attempt to add floatingbehavior to each widget via the customdragdrop script does it fail.
I saw your last post. Great article! Keep it like that. :D
Cool stuff. Check you dropthings url in the first line?
--Jaweed
I have created a webpage which contains two gridviews. The first gridview contains the list of orders made a company. The second gridview displays the details of the order. I also have a dropdownlist so that they can select particular year and view the list of orders for that year. The user can click on individual orders in the left side grid and it will display the order details on the right side grid. I am using callbacks to display the details. If I didn't select any year and it is defaulted to all the years, the performance of the page is really slow. If I select a particular year and click on orders the performance is better. So I thought that if we didn't select any year the view state will be big(that is why the performance is slow) and if we select particular year the viewstate will be less(better performance). But when I checked the viewstate in both the cases it is same. It has same number of characters. So I am not sure which is hurting the performance. Please let me know what I could do to improve the performace.
sridhar.
Interesting approach, cool idea ;)
I was stuck with this problem for weeks and decided to switch back to something like www.example.com/cat/item.aspx but I like the -without extension method- much more.
Thanks for the heads up, I definitely give this a try!
Cheers,
Would just like to commend you on your post here and your tutorial on codeproject.com. I find your posts extremely informative and am definately going to bookmark your blog and check up on it from time to time.
A question I have for you though is whether or not all these Microsoft tools are worth it. As I'm sure you've seen, these tools are often times buggy or close to what you want, but unable to do what you exactly want. This results in countless hours of hacky fixes or overriding of code. Is it really worth it when you can just find open source tools that's faster and works just as well?
The only problem I see with using open source tools is that sometimes they have problems adapting to ie, which microsoft tools program for. I really get torn on this issue. I can't tell you how many times I've used microsoft tools only having regretted getting so far into it and finding out that some controls just don't work well with other controls.
利用IIS的404错误将文件重写成目录的简单方法
www.cnblogs.com/.../387661.aspx
haha
Good solution actually.
:D
Nish
Interesting and easy approach. I will give it a try.
Thanks.
Jakub
thanks for that,
I have another question, here it goes:
My application runs on .Net 2.0 framework and is intalled in three different boxes on a web farm with windows authentication,
The data posted to any of three servers is along with veiwstate and the validation key is Autogenerate,Isolateapps.
Whats is your opinion, Do i need to update my validation/decription key with machine key generated??
Hello Omar,
I am getting the follwing runtime error when using the CustomDragDropExtender in CustomFloatingBehavior.js file.
Can you give me any pointers on where the problem could.
Error: 'AjaxControlToolkit undefined'
location:
At
CustomDragDrop.CustomFloatingBehavior.registerClass('CustomDragDrop.CustomFloatingBehavior',
//Sys.UI.Behavior,
//Sys.Preview.UI.IDragSource,
AjaxControlToolkit.BehaviorBase,
AjaxControlToolkit.IDragSource,
Sys.IDisposable);
I have a question about the IsFirstVisit property. I don't see any documentation on it and I don't even see IsFirstVisit being a valid member of the DefaultProfile class.
Did I miss something?
Nick
It's a custom boolean property that I added to Profile.
Look like AjaxControlToolkit is missing. Please download and install latest Ajax Control Toolkit.
If you are running same application in multiple process or server, you need to have the same machinekey and validationkey. Otherwise encrypted data from one process/server will not get decrypted when another process/server receives it.
So as long as my site does not allow cookieless visits (i.e. cookieless != true in sessionState)
need to worry at all about the piece of code in OnInit between the brackets:
if (!base.IsPostback){ if (Profile.IsFirstVisit)<--this code here> }
Thanks for you help & patience.
So if my site doesn't allow cookieless sessions,
can't I just omit the piece of code in OnInit where you check for FirstVisit and Revisit?
Thanks for your assistance & patience,
wow, thats great Idea. Will try it out thanks
As 404 error is being generated (well...kind of), would you still see 404 in the IIS logs or would it not log that because it's being handled in Application_BeginRequest?
Cool approach though! I got to dig into this to find the alternatives if there are any!
Thx much!
Thank you for the reply. Actually the AjaxControltoolkit is present. I can work with the other extenders that come with ACT, no problem.
Strangely, I can make your extender work if I use Sys.UI and Sys.Preview instead of AjaxControlTookit.*
Any ideas. It must be something small becasue if I use Sys.* instead of AjaxControlToolkit.* everything stars working. I know I can go with Sys.* but perfrmance is important for me as you pointed out in the next post.
In the first comment someone raised an interesting question, and I'm still searching for that answer.
Is it just to save some development time? Or are there any other super-cool reasons to use the built-in membership provider?
Brilliant !!
I have this working when using IIS 5.1. However, when I put this same logic on my Server 2003 production server it no longer works. I think it has something to do with IIS 6. Has anyone else seen this problem? If so how did you resolve the issue?
Scott Gu has done it with different way too,
wow, great 404
weblogs.asp.net/.../tip-trick-url-rewriting-with-asp-net.aspx
Thanks for sharing, I like this article very much!
<link>rx-24h.com/.../link>
ScottGu's form action attribute changing process is still needed in my approach. But he suggested serving extensionless URL using ISAPI module or wildcard mapping. Unfortunately I was not able to do any of those due to constraints. So, I had to find another way to do it which is simple, does not sacrifice performance and requires no third party component.
I found this bug. Seems like it has started recently. The problem is my CustomDragDrop extender uses AjaxControlToolkit. Although AjaxControlToolkit is mentioned as required script, but it is not getting initialized before my extender does. But if you use any of the AjaxControlTookit extenders before my CustomDragDrop Extender gets loaded, it works fine.
One example is put a hidden button the page before any of the declaration of CustomDragDrop extender and attach a ConfirmButtonExtender to it.
<asp:Button ID="dummy" runat="server" />
<ajaxToolkit:ConfirmButtonExtender TargetControlID="dummy" runat="server" ConfirmText="Are you sure you want to do this?" />
This will force AjaxControlToolkit to load and initialize before my extender does.
Someone can register and then use the logged in cookie to flood your system easily. So, you cannot trust registered users either.
Hi AJ,
The problem you mentioned with components not working on all environments is common to both Microsoft and Open Source components. None of them can develop components which serve all specific needs of everyone. They target solving 70-90% scenario. But there are always exceptional scenario when things don't work out of the box. We cannot expect another company or another developer be able to solve my own problems all the time. I will always have to tweak things and make it work as I want. Good thing about open source is I can do that. But with closed source MS components, I can't do that.
I use ASP.NET 2.0 Membership and Profile Provider because:
1) It helps me get started pretty quick
2) I eventually end up creating similar type of tables and SPs for user, role, profile etc. So, no point making my own
3) Whether I use ASP.NET Profile or my own implementation, I always have to tweak things around for performance, scalability, bugs etc. So, whether I use my own implementation or use ASP.NET's solution, eventually it ends up in similar maintenance effort. But ASP.NET Membership/Profile at least helps me get started very quickly.
hi omar
its very good idea
www.ybizz.com
www.cnblogs.com/.../595680.html
You can get access to all your custom properties in Profile object just by type casting:
public void AddStock(string symbol)
ProfileCommon profile = HttpContext.Current.Profile as ProfileCommon;
profile.StockSymbols.Add(symbol);
Downloadsourcecode-841.1Kb www.codeproject.com/.../MakingGoogleIG.asp
We have an existing Authentication Service, which drops an "AUTH" cookie once user is authenticated. And I want to use this cookie to identify if an user is anonymous or authenticated. I did not find any way to add this information (username and the IsAuthenticated flag) into the Profile SettingsContext.
Is there a way to do it ?
Misho!...U r the pride of our country....Wish u all the best and hope u`ll bring Bangladesh a hell lot moments of joy!!
Nadeem
Chittagong University of Engineering and Technology.
and if you don´t have access to iis?
Generally web control panels allow you to set 404 pages. If not, you can ask Support staffs to change it for you.
what about the postback?
If I use this method, at the time search engine crawl, will it show all pages as 404 errors ?
Post-backs won't work with this approach, though. Only the GET verb is passed through to the specified 404 URL.
Hi Omar.
Really great post. Thanks for all your time and work you had to put in order to share that with us.
I'm trying to download your code from the link in the bottom of the article, but the link seems to be broken.
Could you please post it again?
Great work btw; i learn a lot from your blog. This is exactly what I'm looking for but can't get it to work. I keep getting this error in the event log:
EventType clr20r3, P1 stickout.exe, P2 1.0.0.0, P3 4316cfee, P4 system.windows.forms, P5 2.0.0.0, P6 4333aefa, P7 16c5, P8 33, P9 system.invalidoperationexception, P10 NIL.
Any idea how can get this to work? Cheers.
Excellent article, and nice feedback - all very helpful. I have a challenge to throw out to the group here - I need to actually get a reference to a user and profile (and use these methods as a foundation) BUT I am actually doing this processing from a SQL Server Integration Services package (Script Component) that doesn't even have a HTTPContext to hook into :)
This is a text file upload of users into my web application.
Anyone have any thoughts on a way to tackle this? I am *this* close.. but can't see the way...
I'm no good my love and have fun with I'm no good who else love extention green world Thanks you Buy zej.bravehost.com/ewa-sonnet.html super children Glad to see you time I'm no good Buy Order this come to you who else Good work! ewa sonnet
Please try rebuilding the entire solution again on your PC.
Do you have all necessary components installed like .NET 2.0, VSTO, Office 2003 etc.
You will have to parse content of aspnet_profile row for the user from Script component.
interesting
Pingback from Abgar.HeeftHetOver.Net » Blog Archive » Ajax Control Toolkit en performance
Recently I was looking for ways to improve the performance of my new Community Server 2007 installation
Interesting...
i want to create new login control (becouse this one from microsoft create tables and i want to use divs and litle more html code) but o want to use also ASP.NET 2.0 Membership and Profile Provider. So i need to login user in memebrship provider and i don't know where do I do that.
The reason why i want this also is becouse i have used on many places isAuthenticated, and other stuff from Membership provider.
Thnx in advance,
haris
Hi omar,
Could you please give me an example on how to use all th eabove cool stuff in asps page?
Amit
Hi Amit,
The beginning of the post shows how to put this extender on an ASPX page and make DIVs drag and drop enabled.
Any chance a sample Database can come with the code. I might be missing something, is the DB generated if not available.
yybw0ylfcyl [URL=www.572133.com/485067.html] 76sewf6rupqjs2psg [/URL] 6aawzukcbajw
How do you maintain this in a web farm? I am assuming tht Page Flakes runs on at least 10 servers.
Traitor! You don't deserve the 'MVP' title!
<a href="extremedrawing.tripod.com/">adult comics</a>
Good question. Pageflakes runs only on 2 web servers and 1 DB server. So, we can get away with using standard ASP.NET cache. But for larger web farm, you will have to use distributed cache.
Hey its simply superb, I already voted for pageflakes as it is my most favorite startup page. Hope to start my pagecast very soon...:)
All the Best to you bhaia and congrats for the whole team :)
wishes,
Samiha Esha :)
Hi, Really nice article. Wonderful way to solve problem without hurting hosting company as well as performance.
Can we use this with IIS 5.1??? I tried to do so but it is not working. if it should then can u tell me how we can achieve this???
Pathik Thaker
www.codeproject.com/.../httpmoduledirectoryhandle.asp
here is something same like you have done but what about SEO??? The solution is elegant and fairly simple which makes it atrractive but it has a drawback which is considered significant in a modern Web 2.0 world: it is search engine unfriendly. Why you would ask?
Because the first thing that happens is a 404 which means the URL does not exist on the site. 404 response will make almost any SE exclude this URL from its index no matter how this request follows up further on. Basically if someone considers such URLs to be searchable the solution won't work for this matter.
Hey Thomas, cheers for that code. I works perfectly. Thanks ;)
Hi Guys,
Where did you see it returns HTTP 404?
Try http://www.pageflakes.com/omar
Does it give you HTTP 404?
If server returns HTTP 404, browsers will immediately show page not found. There's no redirect for 404.
I m not able to use this extender.
I m getting javascript error "CustomDragDrop" is undefined.
What to do?
Plz Help it is very urgent.........
great post. So i want to start with it and try to implement, but I'm getting the following javascript error: Sys.ArgumentUndefinedException: Value cannot be undefined. Parameter name: interfaceTypes[0] Source File: localhost/.../ScriptResource.axd
Line: 687
I'm using the AjaxControlToolkit file (1.0.61214) from your download. First I had the same error like Raj, but with your help i could fix it and got now the error above :-/
Christian
@Prem
Do you have a link to CustomDragDrop Project in your Webapplication and at the WebForm a linkstatement like these: <%@ Register Assembly="CustomDragDrop" Namespace="CustomDragDrop" TagPrefix="cdd" %>?
Hi Patrick,
Sorry doon't have IIS 5.1 to try. Just out of curiosity, are you running any production system still on IIS 5.1?
Gonsalez music
4500 Waldeck Street
Nice stuff mishu vai!
How do you insert formatted code snippets in your pages? I use CopySourceAsHtml but that doesn't have background color support.
wow, I am sure this is going to be another feather in your cap. Way to go!
Interesting....
My Idea was to introduce more Foreign keys in a table so that I can enforce referantial intigrity...
I have to think again......
Thanx for sharing.
i have gone through numerous site,blogs and community but all in dust. If any has this stuff.........it would be great.
Awesome!! Your approach should be integrated into ASP.NET as a standard process of anonymous cleanup.
However, I can't stop my self of thinking about why should pageflakes store this information in the first place. You said it yourself, there a lot of people just visit anonymously to give the website a try.
My solution is to simply open the website in "DEMO" or "TEST" mode, and state that clearly on the page warning the user that his customizations are temporary. If he/she wishes to keep their customizations, then they should register.
I think it's fair enough for general "i want to check it out" type of people.
Love PageFlakes, especially that you are the person behind it...you're just a great person with a insightful mind!!
Not just that but there are a lot of things stated incorrectly here but are presented as facts. SQL Server does not disable TCP connections by default as he states among other things. Points for thoroughness though!
Im using an httpmodule to dynamically rewrite my apsx pages to seo friendly urls which dont have extensions.
Can I set up the compression to work for these pages. If tried a * and a / in my extensions list but neither work.
Rich
Hi Scott, could you please let me know what are the things stated incorrectly here?
Regarding TCP/IP, I did find my installation had TCPIP disabled. But it's possible default config has changed since first version of SQL Server 2005 was released.
I'm also getting same error as christain. Any fixes recently?
I got it :-). The important thing was that i had forgot options in scriptmanager. First i start with default once:
<asp:ScriptManager ID="ScriptManager1" runat="server" />
But i got an error (previous comment). So debug a lot in javascript, but nothing. So after hours i start to compare the code line by line... And so you have the following options:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" LoadScriptsBeforeUI="false" ScriptMode="Release" />
After i append these in my code, it runs perfect... ;-)
Hi Christain,
If you dont mind can u upload a small working sample somewhere. Though I'm not getting any errors now, extender is not working as expcted.
Hi Raj,
i try to post some code and a link to a zip file (test project), but it doesn't work. So i publish my comment and a link on my own <a href="www.steinisweb.de/.../a>
Hope it helps.
Oups, html doesn't work. So here is the link again www.steinisweb.de/.../PermaLink,guid,a15eefc7-27ea-46b3-8541-791ab9483838.aspx
Omar
"Some independent research shows there's 30% drop in performance in IIS 6.0 when you use wildcard mapping." - can you direct me to where that research resides, and / or provide more details on that?
Also, wouldn't routing requests via a 404 also have a performance impact?
hmm, you need to fix the to-do-list of pageflakes.
There is another way to avoid hand-coding the custom profile class, without having to run your application with breakpoints or disable the database, as long as you're using Visual Studio (like me :). In a page that uses your profile, or defines a variable of type ProfileCommon, just right-click on the "ProfileCommon" type identifier and select "Go To Definition." As long as your site is compiled, the IDE should open up a page like App_Code/profile.abcde123.cs.
Also, to answer Shamim's question, a ProfileGroup has to be implemented as a separate class in the file that inherits from ProfileGroupBase. The ProfileGroupBase contains the get & set properties, and then the ProfileBase contains a get method for the group, like so:
public class MyProfileGroup : System.Web.Profile.ProfileGroupBase {
public virtual object GroupProperty1 {
get {
return ((object)(this.GetPropertyValue("GroupProperty1")));
set {
this.SetPropertyValue("GroupProperty1", value);
public virtual object GroupProperty2{
return ((object)(this.GetPropertyValue("GroupProperty2")));
this.SetPropertyValue("GroupProperty2", value);
public class MyProfileCommon : System.Web.Profile.ProfileBase {
public virtual MyProfileGroup MyGroup {
return ((MyProfileGroup)(this.GetProfileGroup("MyGroup")));
public virtual MyProfileCommon GetProfile(string username) {
return ((MyProfileCommon)(ProfileBase.Create(username)));
I have downloaded and installed on my machine. I really appreciate its working. But I am afraied how to uninstall it. Please do help. Waiting for your reply.
Pingback from robinzhong’s blog - links for 2007-06-06
Pingback from robinz’s tech life » Blog Archive » links for 2007-06-07 » Enjoying Open Source!
The IIS compression really help us much. I been using it logn time ago. the performance can be improve at least > 60-70%. Anybody tried out the IIS7 compression?
"Also after making your own custom class, you will have to remove all the custom properties declared inside <properties> node in the web.config."
In which web.config? The one in the web service or the one in the client using the web service?
Vida
Just delete the EXE from where you installed it.
Anyone else get this to work? If so can you upload an example, I tried Christian's above but that only seems to have 1 column with 1 widget box and I can't seem to add anymore without having undesired effects. so anyone else have an example??
DLINQ和XLINQ的具体查询,更新等操作不是本文讨论重点,本文重点解决如何获取需要查询的数据集。
DLINQ和XLINQ的具体查询,更新等操作不是本文讨论重点,本文重点解决如何获取需要查询的数据集。 DLINQ 如何链接到数据库? DLINQ可以访问DataSet,这种情况我们在本文就不考虑了, 本文考虑的是直接用DLINQ访问数据库
I have used this solution and it works fine on my localhost. However, when I deployed it to the pre-production server, instead of the code going via the Global Application_BeginRequest, I seem to get the standard .NET "The resource cannot be found."
Can anyone shed any light on this?
May i suggest a little "correction" in CustomDragDropBehavior.js?
The _showDropCue() function does a weird behaviour with the cue's div height. This another version of the code fix for me that behaviour:
from:
<code>
_showDropCue : function(data)
this._repositionDropCue(data);
this._dropCue.style.display = "block";
this._dropCue.style.visibility = "visible";
var bounds = Sys.UI.DomElement.getBounds(data.item);
if( this._dropCue.style.height == "" )
this._dropCue.style.height = bounds.height.toString() + "px";
},
</code>
to:
I first calculate the cue's div height and assign it (always) before show it.
Daniel.
Thanks for your great piece of code, Omar. I hope MS take it as example.
Hi all,
I need to do this for an upcoming project as well, and my first thought was to use a GUID for the UserName, exactly as Tim outlined above. Has anyone else tried this approach? Any hidden problems with it? It seems by far the most straight-forward.
Thx,
Joanne
I appreciate your effort which you put to prepare this Document. you explained logshipping very well.
SINISH
replicawatchesdiscount.info/.../citizen-automatic-dive-watch-vintage.php
replicawatchesdiscount.info/.../seiko-kinentic-watches.php
Very good post!!
Need some help from you in customizing this...I want items not to snap to columns and stick to the screen where I drop them. Also to store the location, I want to store the location (x,y,z coordiantes) and not column and order!!
What is the easiest way to achieve this? Please help.
i am new to this asp.net.
i need to develop a general component which can be included in any asp.net site,i need to reject a request from particular ip address ,if number of counts exceeds a particular number with in a particular time period say 1 min,which can be changed according to the administrators wish.
can i use this class for this requirement.or do i have to write httpmodule.if i use httpmodule is it possible to read xml file which contains max number of hits and time ?
plz help itz urgent..
regards
reshma
i have gone through ur class.could u plz describe about HitInfo class and IsFirstVisit?
can u plz provide the full implementation of ActionValidator class .it will be a great help for a new develper like me..
plzz..
Pingback from AJAX Fight Night at Web 2.0 & White Wall Wisdom
I am facing the same issue. A legacy application using the email address as the username. I an thinking:
On Import of User to the Membership generate a Unique username for use in Membership. When a user logs in lookup the username in a non-membership table and pass that to the Membership along with the password to log the user in. The user can change email address anytime and knows nothing about the Membership username.
Does this make Sense?
Regarding the size of the js files used and the time required for downloading - are these files cached upon return trips? If caching does occur with ASP.NET AJAX, what effect will this have in regards to:
a) load times
b) compression
Joe
Pingback from Caching large HTML elements in the Browser’s document cache « Damian Mehers Blog
hi its great i like pageflakes and omar alzabir
i knew pageflakes from the blogs posts of omar alzabir and i am using pagflakes everyday its the best thin in the net i voted for pageflakes
rany aof
Application Developer
<a href="www.3akka.com/.../v1.htm" title="اسعار العملات" >
اسعارالعملات
</a>
Thanks omar for sharing the brilliant idea. But will I Change the Error page setting of IIS programatically? I have an installer class which is executed by the WebProject installer. Our client will execute the installer and will not change the IIS setting manually. So I have to to set it from my installer class. Any Idea How?
Pingback from Fabiano Fran??a » Blog Archive » links for 2007-06-26
I am getting 'this._activeDragVisual is null or undefined error'. Could antbody can help me.
Thanks for the information.
I've just got two questions:
1. What are the advantages of using WorkflowRuntime synchronously instead of in the default asynchronous mode? I always thought asynchronous was faster.
2. Could you perhaps post the zip file somewhere else? The DropThings link is a circular reference back to this page
its easy to clean membership just call
Membership.DeleteUser(Request.AnonymousID, True)
I have bilud your open source success, but I am getting the follwing error when clicking pagetab linkbutton or new tab linkbutton on my dropthings website
Error: "Value of member 'CurrentPageId' of an object of type 'UserSetting' changed,A member defining the identity of the object cannot be changed. Consider adding a new object with new identity and deleting the existing one instead."
I have bilud your open source success on Visual Studio Orcas, but I am getting the follwing error when clicking 'My First Page/My 2nd Page' linkbutton or 'new tab' linkbutton on my dropthings website,
Can you give me any help on where the problem could.
Please turn off CurrentPageId as primary key from database. You will see a composite key in UserSetting.
Will you be interested to share the Orcas version with the community? Please email me the code if you are interested.
1. on ASP.NET, you are in crisis of threads. Asynchronous execution requires one more thread. So, synchronous is better. However, it's not true asynchronous is always faster. There's overhead of starting, stopping additional thread, waiting for it, passing data between threads etc.
2. www.dropthings.com/dashboard.zip
Thank you for the reply.
I have sent mail to you. attachment is the Orcas version source
Thank you for the reply.I have send the Orcas version Dashboard source to you by email.
You have any thoughts on what would be the best way to store a user's settings as they drag and drop widgets on their "page" so that others see the changes when they navigate to that page? (i'm thinking in terms of a very slimmed down portal) -- Would it be writing the coordinates to a database for each widget/div?
thanks,
-g
Greatttttttttttttttttttttttttttt
I am getting 'this._activeDragVisual is null or not an object' error. Could antbody can help me.
Very detailed and beneficial documentation. Thanks to the author.
Thanks again. Now I see it!
How would i architect a 3-Tier application that is physically located on different servers. So I want the Profile object in my presentation layer, but that will not work since I can not call the database directly. I need to create a Profile object on the web services layer that can call the database. I am having a hard time trying to figure this out. Can anyone help on this? Every example i see always uses 3 layer that sits on one physical server???
Pingback from Goodspeed’s Blog » Forms authentication failed for the request. Reason: The ticket supplied was invalid. (Solution)
I'm seeing the same message in the eventlog, however I'm not using a webfarm scenario.
I haven't quite figured it out. I'm guessing my application crashes, which causes new request (with previously encrypted tickets) are validated against different validation- and decryption keys (probably autogenerated on app restart). Sad thing is that my eventlog does not mention app crashes (or recycles), and because of the crash, my logging-features don't get a chance to log the reason...
I'm getting the same error,How can I turn off CurrentPageId as primary key from database.
follwing changes is correct?
"
USE [Dashboard]
GO
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [dbo].[UserSetting](
[UserId] [uniqueidentifier] NOT NULL,
[CurrentPageId] [int] NOT NULL,
CONSTRAINT [PK_UserSetting] PRIMARY KEY CLUSTERED
(
[UserId] ASC,
[CurrentPageId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE [dbo].[UserSetting] WITH CHECK ADD CONSTRAINT [FK_UserSetting_aspnet_Users] FOREIGN KEY([UserId])
REFERENCES [dbo].[aspnet_Users] ([UserId])
ALTER TABLE [dbo].[UserSetting] CHECK CONSTRAINT [FK_UserSetting_aspnet_Users]"