It's possible to remove images now, yes. Your usage of the galleries is excellent! No comments about it there. It's just for the small images like the one used this post. At codebetter.com they're using the gallery for those pics as well, and I think the gallery becomes really ugly there. I like our gallery as it is! :)
UpdateAnother GREAT feature! You'll get an email now when a comment is posted! And as owner of the weblog you're able to edit them! Yay! ;)
Community Server just keeps getting better and better, providing more features then I could even imagine
1 - Too bad the front page is gone. It was a great way to see what was new, although some users wanted more info than the 5 or six that were shown.
2 - How did you manage to get this skin wider?
It never crossed my mind to show more then five new posts, as you can still see new posts at http://bloggingabout.net/blogs/
On making this skin wider, I'm writing a post on it now! :))
Thanks for the upgrade Dennis. It is a nice improvement over CS 2.0.
I have had a lot of comment spam in the past and I have deleted quite a lot of comments. I am not sure if you saw those in the reports as they are gone already. Turning on comment moderation for anonymous comments and turning off commenting on the most heavily targeted posts has reduced the flood quite a bit.
Please keep the latest blog posts on the home page. I know some people (including myself when I don't use an RSS reader ;) that just type bloggingabout.net in the address bar to see the latest posts.
It's hard to figure out how wide something really is, when you're on a widescreen monitor with 1680x1050! ;) It can go higher, but than everything becomes too small for me I guess.
Anyway, you're not actually on 1024 anymore now, are you? :)
Thanks for the info Dennis. I changed the skin for my blog this morning, and I'm pretty happy with the result. And I made sure to set my width to 1024 ;-)
This makes use of the construction that each statement has a return value.
int a,b,c;
a=b=c=6;
Now all three value types will be 6 :)
Just excellent c behaviour that we have inherited.
Or like copying stream data into another.
static void Copy(Stream source, Stream destination)
{
■■■const long Size = 1024;
■■■byte[] buffer = new byte[Size];
■■■long readBytes;
■■■while(0<(readBytes=source.Read(buffer,0,readBytes))
■■■{
■■■■■■destination.Write(buffer,0,readBytes);
■■■}
}
ps. This code could contain errors as I just typed it in by hand.
Hahahahahaha! :)
Remco, thank you for your objective comment! :D
I'll go contact Blizzard if they can add this most beautifull ?? operator into the World of Warcraft scripting language! That'll be the way to get you over the edge! :D
We're getting some serious comment spam at the moment. Just today I've already received a couple of hundred
news of the day a grab bag for what's happening in Community Server Hooray for Jose! Hooray for Jose!
I last posted about the null coalescing operator in .NET 2.0 and just had to post a follow up. I came accross a post on Born 2 Code .NET (via Dennis van der Stelt) where several examples of ?? syntactic sugar are listed to demonstrate how the null coalescing
Thanks Dennis!!!
There's already an implementation for Community Server which I'll probably install...
The question I keep having is, does Jan have problems with being mailed about spam messages, or do spam comments keep sliding through the blocker into his normal comments?!
For the first problem, there's the solution to setup that you don't want to be emailed. I haven't tested it, but you'll probably won't get any emails at all anymore. Also not about the normal posts you have to moderate.
The second problem requires setting up the spam blocker more effeciently. For example try out the Akismet blocker.
In the not so distant past I was bold enough to call Jan and Patrick whiners. But currently I have to
Good call, but why is it in Microsoft.VisualBasic namespace?! And why do they use it for something that has nothing to do with a checkbox?
And main problem was the magical Active, matching that against an enumeration. Why not use an enumeration from that start? Or explain what's done here?! :)
"I guess you missed a new somewhere"
Hahahahaha
<p>I've been doing VB.Net over the last couple of months, and I stopped wondering why things were in the Microsoft.VisualBasic namespace.</p>
<p>But this is just abuse of an enumeration which was meant for something completely different. I know I whine at times, but this should have been detected before the product was released.</p>
uuuuhm.. I won't respond to the second paragraph of this message ;)
At this community with some beautiful members who like to blog here, we had a serious problem. Spam comments.
news of the day a grab bag for what's happening in Community Server Announcing http://clicked.msnbc.msn.com/
You're right, copy-n-pasted it wrong :)
Thanks
from the editor occasional messages that don't fit anywhere else We'll be adding a weekly recap of the
Welcome to our first installment in bringing you the week's top news stories from the Community Server
Hi Dennis.
Are we already running the latest Telligent.SpamRules update? http://communityserver.org/files/folders/spam_rules/entry546534.aspx
Not yet... I'm running an ASP.NET 2.0 version locally now, with those installed. I am planning to upgrade asap. (We're currently running on ASP.NET 1.1).
But as that'll take a few hours, I'll have to see when it's a good time to upgrade. And perhaps do something about that frontpage :)
EINDELIJK weer nieuws over Team Fortress 2. Het heeft 9 jaar geduurd sinds de eerste meldingen over TF2
Nowhere did I say I didn't see the portal already, I just said it's cool that TF2 comes with HL:EP2 with the portal technology :)
Two for the price of One.
Hahaha, I'll hold you to that and tell Alex you said that! ;)
Perhaps we should arrange something at Class-A or something. Lots of room there! :)
WHAT?!
Although I've written articles for magazines before, it had never crossed my mind to create an article
When registered, I got a key and download link, so this is it! You're chance! Download it now! :D
I've blogged about the .NET 2.0 System.Transactions namespace before (toc at the bottom of this post),
@Alex. Have a look at MSBee (http://msdn.microsoft.com/vstudio/downloads/tools/msbee/default.aspx). It allows you to develop for the .Net 1.1 framework using VS 2005.
But I simply cannot understand why VS 2003 is not supported on Vista and VB6 is?!?!?! I hope it means that they haven't tested it yet, so they don't know if it works. Rediculous!!!
Ramon, here's the story from Scott Guthrie. I'll include it in the article as well.
The big technical challenge is with enabling scenarios like advanced debugging. Debuggers are incredibly invasive in a process, and so changes in how an OS handles memory layout can have big impacts on it. Vista did a lot of work in this release to tighten security and lock down process/memory usage - which is what is affecting both the VS debugger, as well as every other debugger out there. Since the VS debugger is particularly rich (multi-language, managed/native interop, COM + Jscript integration, etc) - it will need additional work to fully support all scenarios on Vista. That is also the reason we are releasing a special servicing release after VS 2005 SP1 specific to Vista - to make sure everything (and especially debugging and profiling) work in all scenarios. It is actually several man-months of work (we've had a team working on this for quite awhile). Note that the .NET 1.1 (and ASP.NET 1.1) is fully supported at runtime on Vista. VS 2003 will mostly work on Vista. What we are saying, though, is that there will be some scenarios where VS 2003 doesn't work (or work well) on Vista - hence the reason it isn't a supported scenario. Instead, we recommend using a VPC/VM image for VS 2003 development to ensure 100% compat. Hope this helps - even if the answer isn't entirely what we'd all like it to be, Scott
Ever since the first release of WLW I have been writing my posts with WLW. Uploading images had to be done seperately, which was annoying. But finally it works from inside WLW. Fabulous news!
news of the day a grab bag for what's happening in Community Server J-O Eriksson adds to the Stockholm
Better markeup.
And a decent text editor that produces better markup.
I found the admin controls to be clunky too. Much prefer Telerik's controls.
Also, I find it very difficult to find my own blog!
Oh, and the search is near useless. I searched for "Mindstorms" on here, knowing someone blogged about Lego Mindstorms a while back and it came back with nothing.
Better hope he likes Brown beans ;-)
Congratulations Dennis!!!!
Congratulations! You have already given him a five star rating, so there is no need for me to do the same ;) I wish you and your family all the best.
Hey kerel. Gefeliciteerd! Wist niet dat er een derde opkomst was :)
@Jan : Brown beans?!?!?!
@Marco : Are you kidding me or are you for real? Because he does, but then they all do :) All three have my brown eyes from the birth, while that's nearly impossible as all kids start with blue when born. :)
@Erwyn : I wouldn't dare. Honestly :) As I said in my CS 3.0 wishes, I'd wish you could track people that have rated the post or something. Or be obliged to enter a comment when you're rating or so.
@Philip : Those first three months or so are (as far as I concern) the hardest of their entire lifes. Up all night and that kind of stuff. We'll see how this one behaves ;)
Congrats :)
Van harte jongen; eigenlijk wist ik wel dat het een jongen zou worden, je stond zo te glunderen woensdag 8)
I want to begin with a conceptual explanation about services. A service always has at least one endpoint,
Et oui, si vous jeter un oeil sur mon blog, vous remarquerez que l'entete diverge un peu du theme montagne
I think you're configuartions is messed up again. Cause I can select multiple feeds and select the Mark as Read and it works.
Try to open one readed RSS Article and select the Mark as Unread in the RSS Article. Close it and now the options you mentioned above must work. Very strange workaround.
Ha leuk man! Van harte gefeliciteerd!
As seen in the previous article, we need an address, binding and contract to complete the WCF ABC. We'll
PingBack from http://bloggingabout.net/blogs/dennis/archive/2006/10/18/WCF-Part-0-_3A00_-Introduction.aspx
In the past, I used Colin Coller 's CopySourceAsHtml in Visual Studio.NET 2003. Once Visual Studio 2005
Yep, I tried this new one as well. Works like a charm!!!
You're not blind, it was a really simple solution completely fixed for my project. So not worth sharing.
Very sharp Bes, very sharp! I'm crossing my fingers for not going to "de Schie"!
Hmmm, seems I've deleted a comment by accident, the one before the "You're not blind" one.
Anyway, it wasn't a framework, just some methods. A main method (behind the start button in the screenshot) just executed all other methods. There was (for example) an Assert.Equals method that compared two parameters to see if the result was expected, including a parameter to let the assert method know what row it should show a red or green light. All functions in the screenshot were on a fixed location, so that was the row I had to give the Assert.Equals function.
Just plain and simple. Like KIS (Keep It Simple). :) But I had fun doing it.
lol @ erwyn! :) I thought I had excluded it from main feed, but seems I forgot one checkbox or so...
Introduction CopySourceAsHTML will give you an error while using it in a Microsoft Virtual PC (I'm probably
Not so long ago, my colleague blogged about an error on the MSDN site. He blogged about their password
Hehehehe, you're welcome :)
Finally .NET Framework 3.0 RTM'd , so I don't have to run in my VMWare anymore. A good time to see if
Last time we saw how we could create an instance of our service by hosting it using some configuration
Dennis van der Stelt posted some fine articles about Microsoft's new way of doing communication between
news of the day a grab bag for what's happening in Community Server Ken Robertson reports that the San
You may be pleased to know that Microsoft will release a service factory for WCF services next month!!!
I'm not sure I care... From what I've seen so far, the service factory isn't my kind of thing.
You made a post that at TechEd they had a service up and running in 10 minutes. I can do this by hand in under 30 seconds!
Dennis,
There might be an easier way for doing this (works with peerChannel, not sure about regular callbacks), check it out:
http://blogs.msdn.com/kevin_ransom/archive/2006/06/10/Automatic-port-number-generation.aspx
I saw the duplex option at Tech-Ed. I was really impressed with that option.
Waseem, I tried the port 0 in code, as I read somewhere else (not a WCF reference) that it would use any available port. But it returned an error.
Will try it again using config though, perhaps it'll work than.
Interesting contest.
About the refactorings Billy mentions, I found the following useful URL:
http://www.refactoring.com/catalog/
Since my colleagues Dennis and Alex are writing articles by the minute, it was time for me to do the
And then you manually change NewWriteDocumentElements to a more useful name? Or am I missing the point here :-)
Hahahaha, indeed it is! :)
The green bars are there so you'll immediatly notice where the name is referenced. The shift-alt-f12 from your last article ;)
When you change one green element, all elements change with it. And it doesn't matter which element you change. Also they keep active and linked, until you press [Enter]. Pressing [ctrl]+[enter] will disconnect only one link.
A bit better than the Visual Studio 2005 refactoring options, but I don't want to start another bitslapping ;)
One thing worth mentioning is the fact that Refactor! Pro is a DevExpress tool.
Last time we generated the client and configuration file. Whereas in the asmx world we had a proxy class,
Be sure to have the WCF/WF extensions installed! You don't need the >1GB SDK installed.
Hehehehe.. I know, it sucks. I know someone who HAS a key already, he was real early. So the system was up! >-(
PingBack from http://bloggingabout.net/blogs/dennis/archive/2006/11/20/Running-Vista_3B00_-Redmond_2C00_-we-have-a-problem.aspx
@RJ : Not that I'm aware of. I ran the setup with my user in the admin group, I ran it with that user using "Run as administrator" ánd I enabled the administrator account and installed it with that user. Nothing worked.
No I haven't, thanks for the tip.
It's definitly a personal problem, I figured so far. No one else is having problems like mine.
I installed the latest (SP2 enabled) SQL Express btw, which installed fine. I have the Express Management Studio running now, so I can still access data.
I installed Vista myself two days ago.
And, as I had with the RC1 and RC2, my video card (x800xt pe) isn't recognized ... meaning I dont have the Aero theme running atm :( that sux
I had it in Beta 2 (i think :s), and I really liked that thing tbh :)
Hope it's fixed in the final release of the Catalyst drivers, or maybe a Windows Update ...
@Frans : Hmmm, I thought I'd written a reply already, but maybe I didn't press the submit button or so.
Well, I had installed Konfabulator in the past and did it again today. But all widgets differ in size, there's no sidebar and I don't see any widgets I like. I just want the clock and calendar. Perhaps in the future some widget to plan meetings and such, with Google Calendar and Outlook integration or so. Whatever. Thing I want most right now is that it sticks to my desktop when I press Window+D
@Nick : I've read there are ways to enable it anyway. Perhaps you should check it out. I've already got TweakVI running, which offers the option to run Aero in software mode, if I'm correct.
Dennis van der Stelt modifies the new MetaBlog API released only yesterday to support George J. Capnias'
Dennis van der Stelt wishes upon a Telligent Star on what he'd like to see in Community Server 3.0. Topics
Fresh off a marriage proposal based on his expert knowledge of the CS Spam Blocker (see yesterday's
Dennis van der Stelt with a step-by-step guide on how to disable email notifications of Spam , linking
Dennis van der Stelt with details on handling spam in Community Server .
BloggingAbout.NET taken off 24/7 Upgrade Watch . Successfully upgraded to CS 2.0. Good job, Dennis!
Another site on 24-hour Community Server 2.0 Upgrade Watch. Dennis van der Stelt tells his community
I should post that, shouldn't I?
It isn't possible though, and I forgot what I actually used to get the values. If I'm not mistaken, I'm using the Request object to get the values myself. If you're really interested, I could look up the code. Send me a mail via my contact form. (mail button top-left corner of this page)
Frans, I wasn't talking about 3D tabbing, because I never use that.
And what about a fancy PC with a fancy videocard, instead of a big videocard? THe only fan I hear is from my power-supply and I've already got a quiet one lying around. Just have to install it.
Because I'm doing presentations, demos and the WCF article series , I host a lot of WCF services inside
We'll return once again to the WCF ABC and in this part we'll examine what we can do with the address
Usualy Oracle known as the most secure database since decade but this truth is now changed in dramatic
Could it be true? A research shows that there were no security flaw fixes in SQL 2005 since its release
Almost a year ago, January 26, I tried to start a short list of links that I found interesting, and called
PingBack from http://mdavey.wordpress.com/2006/12/01/opentick/
I am glad to see support for CardSpace arising. Sadly, Microsoft doesn't seem to use it themselves yet. I am hoping I can sign in to Microsoft properties using CardSpace instead of Windows Live IDs (aka .NET Passports) really soon.
The voice capabilities of Exchange Server 2007 are pretty impressive for both Dutch and English! I am hoping for a Windows Vista version that can recognize both Dutch and English as well.
Round 1: compile offense, LX defending Colleague Dennis (irl, compile in CS and WoW ) tries to give a
news of the day a grab bag for what's happening in Community Server Dennis van der Stelt gives us another
Dennis van der Stelt gives us another example of an integrated IE7 Search Provider we saw on Andrej Tozon's
Happy happy joy joy! :-) Seems like a cool toy with a solid design but I don't want to have a player that restricts me in my format choice or having a player with wifi that doesn't allow normal filetransfers.
I have a question and since you are into WCF maybe you know the answer....
When you right click on an app.config it should be possible to open the file with the SvcConfigEditor.exe as an option in the context sensitive mnu.
But I couldn't find that option. Do you know how i can add it ?
@Patrick : You have to install the WF/WCF extensions to Visual Studio. You can find them here :
http://www.microsoft.com/downloads/details.aspx?FamilyId=F54F5537-CC86-4BF5-AE44-F5A1E805680D&displaylang=en
More info in an article from Mike Glaser :
http://bloggingabout.net/blogs/mglaser/archive/2006/11/06/.NET-Framework-3.0-has-been-released_2100_.aspx
However, this doesn't include everything. For example, the trace utility is in the SDK, which is 1 GB large! :) I hate that!
@Ramon : It does restrict in format, although the transfer tool converts other formats into Zune formats. The normal file-transfer is possible though via a simple registry setting.
@Pieterd : Hmmm, I think I'll just delete your comment and live by the thought that I'm the first! ;)
The Plus in Professional Plus stands for the addition InfoPath and the Office Communicator.
I know, but normally Plus was for some Christmas additions and a new screensaver in Windows :)
I just questioned the name.
I ran into another problem, the Dataset designer, in other word if you open xsd file to play with the tables.. a little.. the VS IDE will frezz every time you try to move any element from the xsd editor surface (TableAdapters) and unfrezz after few seconed but will frezz again with the next move.. so useless
:(
I tried this a while back and IIRC creating a new account was disabled, however it looks like weblogs.asp.net shares member info w/ *.asp.net, so you can create a new account from the other pages as well and it will be shared across the entire TLD.
Regardless, good find...quite a few asp.net bloggers have anon comments disabled so this'll help out quite a bit!
Download code & sql scripts here I got a question today about setting the isolationlevel on a transaction
news of the day a grab bag for what's happening in Community Server Eric A. Duncan is good on his word
Dennis van der Stelt lists the default login and create new account page links at weblogs.asp.net and
I just read Dennis post about his adventures in isolation level land . He says he does not know a good
Wow your blog looks nice man. Good going !!
Hehehe, it is that I know your name, or else I would've thought this would be spam. I get a LOT of comments with just "Wow, good site! Check out mine!" ;)
But thanks for the comment.
Wow, good site! Check out mine!! ^-^
Just recently Service Pack 1 was released for Visual Studio 2005. Back then, the Vista update had a link,
Remember it's not the final version yet, but a beta.
You're right! Miguel's post made me believe for some reason it was the final version. Updated the post. Thanks.
hiho,
The branded Rational Unified Process provides a ton of artifacts that a team can use when developing software. And there is little talk on collaboration or even how people are expected to work together. The early version of SPEM (the Software Process Engineering Metamodel from the Object Management Group) used to describe the process leads one to think of a situation where "I do task X alone and create artifact A, you then pick up artifact A and do task Y alone which produces artifact B, then someone else...".
That is not how it has to go, but the content provided by that version of the Unified Process can lead people to think of it that way.
A group of people have been authoring an open source version of the Unified Process that takes an agile perspective. It has the end-to-end process structure recognizable from the Unified Process. It treats it as lightweight as possible. It includes guidance on various collaborative and other humanistic perspectives of developing a system. It includes roles for the sake of defining required skills, but does not have a strict perspective on roles or top-down tasking (i.e. promotes self-organizing teams). It folds in various agile techniques such as TDD, Refactoring, Continuous Integration, and even applies a Scrum-like technique for project planning.
You can download it at http://www.eclipse.org/epf/ of view the 0.9 version of it published at http://www.numbersix.com/openup/.
------- b
No hacks, but if you want to live dangerously, just launch explorer elevated and then any file you double click will open its associated application elevated too...
hi
its very helpfull
Denis van der Stelt me ha marcado con un tag . Sabía que esto iba a alcanzarme tarde o temprano, así
The blog tagging game is still going on. With all the big names and blog-gurus tagged, eventually the
Couldn't think of a better subject, so I just used Dennis' subject. Dennis tagged me and yes, as Alex
5 people? I make that 8!
[)amien
@Damien : I didn't think anyone would actually count them! ;)
I've been tagged by Dennis van der Stelt . So... 5 personal things about me: 1 Two weeks back, on the
I've been tagged by Dennis van der Stelt . So here are 5 personal things you might not know about me:
Actually, I am an ASP.NET / IIS7 bloke :) Glad to help!
Mike
Hehehehe, okay, thanks! I hope everything with Vista & VS2005 will work soon! Keep up the good work!
So I've been playing around with my new Zune player . I've listened to a ton of music, converted and
this seems to be what your looking for:
http://www.regimages.com/
I am able to upload my old MP3 music to my IPod. But my problem was i always had to use the crappy ITunes software. I could upload mp3 using the file system but the Ipod would not recognize it as a music file. After a tip from Elias i updated my IPod with a new firmware and I now use RockBox, i'm now able to upload Music file using the file system and not through ITunes, this is much better.. But i have to say Dennis his Zune looks and works great!
I know Patrick, but updating firmware isn't something I prefer. I also don't think ordinary people will update their firmware.
The latest Zune firmware caused a significant performance improvement for browsing the music library. I wouldn't want to miss out on it.
On the other hand, I _do_ like RockBox and it's blue/white MSX ascii look ;)
There's been a lot of talk about web 2.0. Personally I see difference between web 1.0 and web 2.0 as
As I've been pretty busy, it's been a while since my last post in the WCF series. But let's have a look
I'm starting a series of posts about Windows Communication Foundation (WCF). The goal of the series is
Great post. I can hardly wait till you start your first project on which you'll use WCF in a real life app.
Keep us informed.
PingBack from http://www.alexthissen.nl/blogs/main/archive/2006/11/08/bitslapping-contest-lx-vs-compile-on-test-integration-in-vs2005.aspx
I didn't update my firmware and I still can upload my mp3's without any problems. Just use Xplay! Xplay Rules.
Round 3: LX on offense, compile still recovering See the previous rounds ( 1a , 1b , 2a , 2b ) in this
>>
The sidebar I've never ever used. It's useless up until now. Especially because going to the desktop means the sidebar will hide as well.
<<
Right click->Properties->check "Sidebar is always on top of other windows"
(particularly useful on wide screen monitors)
Also drag your gadgets on the desktop and set their opacity to 20% (again, via contextmenu)
"Especially because going to the desktop means the sidebar will hide as well."
Not, if you press Win+M to minimize all applications.
@Daniel : I know, but I don't want it on top of the other windows, I want it on top of my desktop.
@Thomas : I know, but dialog windows aren't always minimizable which means I won't see the desktop, but the dialog windows. And depending on the order of the app with the dialog, other apps won't minimize as well. Therefor I've grown used to Win+D which is the only thing that works.
Man, chickening out of this as well.
Well, anyway, if switching between different options is so easy for you, I wonder why it takes you so long to switch to VS2005 unit testing. :P
@Alex : HAHAHAHAHA! Don't kid me! It is EXACTLY like Vista. I was using NUnit and wanted to try the great and famous VS2005 unit testing. After a few tries, I switches back a.s.a.p!
I just blogged that I'll be switching back to Windows XP . One of the problems I forgot to mention is
Hello Dennis, i was shocked with the number of BSOD you got since you installed Vista.. i'm now over 30 days with vista RTM BUILD 6000 as my full time development station running VS SP1 with no problems till now, i didn't recall any forced restart.
my machine is P4 3.06 HT x86 with 1GB DDRAM and GeForce ship with 256 MB and my Vista score is 2.3
I didn't even saw the screen on your post before.
My Vista blues isn't over yet either. No blues screen though. Just crashes on hibernate and sleep.
Worse is that a timebomb in the beta device driver for my SoundBlaster Audigy 2 sound card will go off on January 12, 2006. Creative has retracted their statements about availability of Vista drivers for this sound card. People in the support forums sound pretty pissed about this.
Not having sound in Vista is pretty unacceptable to me, so I either have to buy a new sound card or switch back to XP :(
I also get the feeling that XP is way more stable (if more insecure) than Vista for me.
@Adel : I'm using it as full time dev station as well. It's a Dell Latitude D810 with 2GB memory.
Did you do web development? Besides the fact that IIS7 and Vista security vs. VS2005 still doesn't work excellent, it's also a problem for me that I have to release on Win2003 with a different IIS version. Although we have an OTAP cycle, it sucks that I have to double-check all IIS settings before I can release something. My customer currently has very short release cycles.
Maybe I just request too much from my Vista environment. But hey, XP delivered. Vista might be great for average users (I'm not saying you are ;) but I am quite demanding ;)
Oh, by the way, when I pressed the "check for solution" button, some server was contacted for info... nice progress bar... suddenly it disappeared and I heard nothing from it since then. So I guess there's no solution to BSODs ;-)
I've had my share of BSoD's with Windows XP. Especially when XP was just out, and lots of people upgraded their old computers to XP. When it started crashing, they would ask me why...?
Every new version of an OS (Windows or other) has got higher hardware requirements. And I think it is 'normal' that the new OS doesn't work 100% perfect with older devices or older drivers. Adel's is a nice example that there are configurations that run Vista without any BSoD's popping up.
I will be upgrading my workstation shortly (hardware-wise). As soon as that has been done, I'll start running Vista. Any and all findings will be recorded at my blog...
Buenas, mis amigos Eugenio y Fran , me han apuntado con un láser desde un satélite espía anotado en una
What is the extra you get by adding an 'mex' endpoint?
I noticed you can generate a client by just adding a behaviour and have the 'httpgetenabled' set to true.
Can you tell a bit more about what the mex is for?
The Metadata behavior will generate your WSDL and XSD. It kind of crawls over your contracts, looks at them and generates these xml documents.
When you want to provide this through HTTP you must specifiy HttpGetEnabled. But when you use the service-util (svcutil.exe) you don't need the http-get.
In the old days (before the June 2006 Beta) the MEX endpoint was added automatically. I figure about 80% of the demo-code available on the internet, doesn't comply anymore to the MEX endpoints you now have to add manually. :)
Anyway, MEX endpoints are more than http-gets, you can also support https, tcp, etc. Where in the asmx days, you always had your WSDL via HTTP. You can also choose to NOT have a MEX endpoint and provide your customers with a WSDL and XSD's of your own.
_rowUpdating event will not firing, when dynamic create GridView. not only findcontrol but also no value e.NewVlaues too. is that any other way to get the values from GridView?
Someone is reading. Someone is also smiling at the grilling Dennis apparently gave himself?
Thanks for the tip. One can forget the simple things.
Huh? XBAP = WPF. I mean XBAP is just a form of deployment of a WPF application. So you can't meaningfully list the differences between WPF and XBAP. That would be like listing the differences between a car and a steering wheel.
BTW: We found that ClickOnce is often a better way to deploy an WPF application than XBAP. If you also use WCF in your application, you require FullTrust and you don't want to be in an XBAP sandbox.
At LogicaCMG we've created two cool ClickOnce deployed WPF applications that use WCF to fetch data from services, yet they also work offline. However, they are deployed on our Intranet so I can't easily show them ;(
For an example of a simpler yet cool ClickOnce deployed WPF app, check out Vista Flickr Uploader (http://www.matthijsdubbeldam.nl/app/VistaFlickrUploader/ and http://www.codeplex.com/vistaflickruploader). It was created by my colleague Matthijs.
XBAP is indeed a form of deployment, so the differences between XBAP and WPF are mostly just that. The details are listed in the article. And indeed with XBAP you run in a sandbox with partial trust, which WCF doesn't support.
I wrote the XBAP/WPF [1] post so I going to jump in to the discussion.
Yes, XBAP is really just a built in WPF mechanism to deploy your WPF application. Since it runs in the Internet Zone it is constrained to the security limitations of the zone. Which is why you can't make WCF calls. The *.xbap file is just a deployment manifest and the xbap extension is registered with IE during the .NET 3.0 install. As Erwyn says, you can easily create your own ClickOnce deployment to request Full trust.
I keep getting questions about XBAPs though, so I wrote the article for quick comparsion of the two.
I think there is some confusion, because XBAPs show up as a Visual Studio project type. So developers want to know what the difference is between a WPF app and XBAP. Is it like the difference between a Winforms app and an ASP.NET Web application for instance.
BTW Dennis. My name and phone are in the Contact section - the bottom of the right column <g>.
[1]
http://wpfwonderland.wordpress.com/2007/01/28/comparing-wpf-applications-and-xbap-whats-the-difference/
Hi Walt. Your post, to which Dennis linked, indeed makes clear what you are comparing: standalone WPF applications versus XBAP deployed WPF applications. This was paraphrased by Dennis as "list of differences between XBAP and WPF", which is a little too short of a description ;)
lol, there's a list of differences and I can't call it by its name?! :)
The global launch of Windows Vista yesterday brought a large number of updates with it. Yesterday I installed
I'm having a similar problem. When using a GridView whose DataSource is set manually in code-behind, e.NewValues contains nothing (even with BoundFields).
Markup:
<asp:BoundField DataField="QuoteText" ** other attrs **/>
Code-Behind:
gridview_RowUpdating(... sender, ... e)
// e.NewValues.Count == 0 :(
I get the BSOD daily... i upgraded to vista last week and it doesnt stop....as for creative retracting their drivers.... i got them from creative on feb 3rd and they work fine.... and this morning i got caught in a continuous blue screen reboot loop after my system installed an automatic update....so i went into safe mode and removed it and turned of auto update and all is good again...well at least good till i install something else.... i have never had a blue screen on xp unless i way over worked the os (which was done intentionally to see what it could really handle) so as nice as vista looks, microsoft needs to get off their butts and not make us wait a year for a service pack to fix these issues.
My current workaround is to have the user redirected to an edit page when attempting to edit a GridView row. This isn't ideal, but frankly it allows me add customizable edit code (large TextBox, etc.).
Hi Dennis,
Just coming to your post to tell you that i rolled back to XP few days ago.
As I'm not doing Web Development... so on the development side i haven't experience show stoppers but still lake of drivers and incompatibility with many other softwares got me back to XP again.
I've admittingly had a couple of BSODs but my score is only 3.7 cos of my crap graphics =[
I had Vista on a pretty decent laptop, on which only the videocard wasn't all that. My score on graphics was a 2. And a 3.7 is a really decent score, I must say!
news
15 BSOD? Wow. I only got that once, and it was during the installation stage. Everything went smoothly thereafter. Maybe some of your problems are driver-related perhaps? In case it is, go to http://www.radarsync.com/vista for the appropriate driver. If it's not a driver problem, then I think it's time to call Houston :)
It's actually fairly easy to get the info you want once you know the trick. When dynamically binding to the GridView, use the following code in the RowEditing event:
GridView gv = (GridView)sender;
gv.EditIndex = e.NewEditIndex;
gv.DataBind();
To populate the NewValues collection, put the following code in the RowUpdating event:
for (int i = 0; i < gridView.Columns.Count; i++)
DataControlFieldCell cell = gv.Rows[e.RowIndex].Cells[i] as DataControlFieldCell;
gv.Columns[i].ExtractValuesFromCell(e.NewValues, cell, DataControlRowState.Edit, true);
Then you can use the NewValues collection as you would if the GridView was bound to a SqlDataSource. This works with both bound fields and template fields.
Nice SQL statement
For Additional info about Shrinking a SQL Server log
check my blog http://bloggingabout.net/blogs/mglaser/archive/2007/01/12/sql-server-tip-shrinking-a-sql-server-log.aspx
Hi Jeff,
I have a similar problem too. I have GridView with that gets data from table (using a dynamic sql....creating Views on fly). So I donot know the table structure thats going to bind with the GridView.
But anyways the first three columns are known, the last among which is date.
I have created a TemplateField (Say DataGridCalenderControl)implementing ITemplate interface.
Unfortunately I am not able to CAST the DataGridCalenderControl to DataControlFieldCell
DO you have any suggestions
Two more stops made and one more to go on the first tour of Bob & Chris' MSDN Roadshow! Portland,
I'm so glad I found your presentation! I would like to take it, make a couple changes, and present it to a group at work (with proper credit of course!) That ok with you?
Also, I think a good addition would be an example of using a mock object; I added a slide with jMock in my own version.
Shawn, sure you can. I'd love to see what you've changed, especially the mocking stuff! If you can, send me an email via the contact page. I'm not that happy displaying me email address here for all bots to take and spam me crazy. Thanks
http://bloggingabout.net/blogs/dennis/contact.aspx
I'm currently implementing a workflow into a project, also using the sequential workflow.
Main reason is indeed the ammount of information found on the net. Actually, I simply don't know the difference between the two types ...
Thanks for the heads up. I think my current project might benefit from this one...
Kind regards, Rick
when i update a grid view i dint know how to assign it to a variable......
because i can update a sqlserver database in update command where i need to give
update table-anme set fields='"+.....+"'
Congratulations! Should be a great conference.
This will be your first trip on a plane, right?
Yep, I'm soooo excited ;-)
I'm taking my laptop on board and hopefully have at least one spare battery with me.
Not into the *** Cat Dolls? Tssseess, get your priorities straight, Dennis. Go see Nicole, before she leaves the PCD.
Anyway, have fun going there, and check out the Circus Circus that had a large arcade (video games) section last time I was there.
Congrats, Dennis; Have fun!
Circus Circus also has that big funny indoor adventure park!
Be sure to behave over there, Dennis ;)
Recently I needed to set up some simple code to demonstrate WCF (as an alternative to some other means
Hi Dennis!!
At last. I'll be attending Mix'07 also. Leaving from London on 27 and coming back on the 3rd
Hope to see you over there! We have planned a cool party agenda :)
jeff?
i did that u posted ? but its not working
i m not getting any value? i m using itemtemplete/edidttemplete , i m stuck here for many days, i cant get values on text ( after we click update)
and how could we call updated? rahter than updating
u can email at umer.khan@systemsltd.com just bug me ,i ll reply with simple code i did
You can also find the Beta 1 download links in my blog.
Thanks for the information. The databind in the row editing event did the trick. Trying to enable/disable a control depending on the user rights.
Thanks.
code for rowupdating event
sorry, but that's not deep-copying either, if firstName was a referenceType (such as a StringBuilder) it would just copy a reference to the original.
Sallow Copy - copies ValueType only (such as strings)
Deep Copy - copies ValueType and ReferenceType
Geen workshops over EntLib 3?
.... dan toch maar naar U2U ;-)
Hahahaha, sufferd! :D
Dat doe jij toch op CodeCamp? Dan hoef ik dat niet meer te doen! :D
If I inspired you to boil down your previous code to come up with an even simpler scenario to introduce WCF, I´m happy. Maybe we should start a competition on how few lines are necessary to use get started with WCF? ;-)
However, you mentioned twice you wanted to abstain from commenting my sample. Why? What´s wrong with it? I don´t think using two processes is necessary for a WCF introduction. It just makes it more difficult to get the whole thing running. WCF makes process boundaries pretty transparent, so I don´t think they are needed.
Rather much more important I deem separating contract from implementation - which you neglect. Also a WinForms application does not make WCF easier to understand.
Also, do you think meta data exchange makes understanding WCF easier? Hm...
But anyway, I´m happy you took up the challenge ;-)
Cheers
Ralf
Hi Ralf,
The single project to get everything going isn't what WCF is about, I think. So that's why I always need at least two projects.
The thing I ment was you were creating client and service by means of multi threading. That doesn't make the example easier to understand, just a lot harder.
The other thing about process boundaries. I'm not sure what you mean there. With WCF you ALWAYS have two process boundaries, because your service/host and client aren't on the same process. In WCF vNext that might be possible, but currently it isn't. Even though you only have 1 project and start everything on multiple threads, still everything is serialized into XML and send cross process boundaries.
Hi Dennis, I'm also interesting to use this dual application with wep.net page, did you make it before?
best reards
@Hazem: I seriously have no idea what you're talking about, sorry :)
Hi Dennis! I'm very excited about this feature. However, I'm unable to install IE7 and .NET 3.0 here yet...
Is there any way that you could grab just this addin and post or email me those bits? Would it even work in plain vanilla VS2005?
As an aside, I'm doing a "tools" talk at our Philly.NET Code Camp tomorrow, and I'd *LOVE* to show off this thing :)
Thanks!
Travis
Hi, Dennis,
I understand what you say, you need two projects. And I agree in the end WCF mostly will be used in such scenarios. But two projects are less easy to set up in VS than one ;-) That´s the only reason I used one project or even just one file. I´m just concerned about getting a WCF sample up and running with the least number of steps and with the least number of files. So I guess we can agree that this is possible only with multithreading like I did it ;-)
In addition, though, I think, WCF is not about a particular "distance" of client and service. It´s perfectly fine to use WCF within the same process, e.g. to cross AppDomain boundaries. And it´s a means to hide "distance" in general so I don´t have to care whether code is running in the same or a different AppDomain or in another process or on another machine. So letting two threads communicate using WCF for me is perfectly valid - albeit maybe a little bit unusual.
What you say about process boundaries does not seem 100% correct to me. You´re right in that messages are always passed between client and service (host). Data always will be serialized. But a process boundary - as you can see in my example - is not necessarily crossed. My client and service host live in the same process and that´s just fine with WCF. However, in a larger scenario I would not just provide a TCP endpoint for intranet communication but also a named pipe endpoint for fastest communication on a single machine - possibly within the same process.
But again: I was not concerned with a real life example of WCF usage but a most easy demonstration.
-Ralf
Oracle still sucks...
http://searchoracle.techtarget.com/originalContent/0,289142,sid41_gci1255866,00.html
Uriah, you're right, I'll have a look at the image. Thanks for your comment.
Also the CTP is the final version for Visual Studio 2005. There won't be any new version. For the next Visual Studio (currently codenamed "Orcas") these will be integrated...
In other words, it's safe to download the latest CTP.
At MIX07 new stuff was announced , at TechEd 2007 in Orlando names of products have been announced. Visual
@Jack: It depends on what you're doing. Are you starting the transaction inside the unit test or inside the webservice.
Inside the webservice means you'll have to tell your webservice to rollback the transaction
Inside your unit test is a different thing. If you're using .ASMX webservices, there's no change the transaction will flow over the webservice. Even with WSE 3.0 it's impossible.
If you're using WCF services it is possible, but you'll have to alter the design of your service if it doesn't already support flowing transactions into it. And transactions aren't always a good design for your services.
Normally for these kind of integration tests you should setup a specific test database. Just before running the scripts you restore or create that database with a fixed set of test-data in it. You run the tests and assert the data that's returned. On the next test-run, you again restore the database. That's a much better practice for these kind of tests then using transactions. :)
If you want more info, just reply here or contact me personally.
Hehehehe...
Definitely! Heard you're coming by! Looking forward to it!
Oh shit, totally forgot this one...
I have installed BizTalk Services on my laptop and I think they can be installed seperately. If you mail me, I'll send them.
bloggingabout.net/.../contact.aspx
Yeah baby Yeah!!
Here a little extra for the players of LOTRO, the ABC-song of the imperial march (en.wikipedia.org/.../The_Imperial_March)!
X:1
T:Imperial March
C:Translated by Earacorn
M:4/4
L:1/4
Q:100
G G G ^D3/4 ^A/2 G2/3 z/2 ^D3/4 ^A/2 G z/2
d d d ^d3/4 ^A/2 G2/3 z/2 ^D3/4 ^A/2 G z
g G g ^f/2 f/2 e/4 ^d/4 e ^G2/3 ^c c/2 B/2
^A/4 A/4 ^A ^D/2 G3/4 ^D3/4 ^A/2 G ^D ^A/2 d z
^A/4 A/4 ^A ^D/2 G3/4 ^D3/4 ^A/2 G ^D3/4 ^A/2 G
I thought for a "force choke" you didn't actually need to touch your victim! :)
or did you mean something like this?!
Pingback from University Update-Bill Gates-The state of shared vision
Seeing the comments I think I would like the presentation as an inspiration for my presentation this week, but I cant download it could you send it to me? julian_hessels@hotmail.com is my e-mail box
I've recently used WF in combination with SharePoint 2007, and built a custom statemachine workflow because the process required a loop between several tasks.
If you can't predict how often you want to loop around, a statemachine workflow is easier although you could model a while activity in a sequential workflow.
I would say you use a sequential workflow when the possible paths your process has are straightforward (more like a decision tree) and contain no or little looping around.
Another thing is that inside the individual states of a statemachine workflow, you model sequential flows of activities to get things done (I guess without any form of sequential workflow that would not be possible) or you have to write custom activities to handle all this
Nice..... and for the link: http://www.goasoft.com/
And thank you Marco! :)
Hi,
it is not working for me, im trying to read the value of a bounded field during edit mode. i tried the ExtractValuesFromCell but getting thye following in the watcher: Expression has been evaluated and has no value. what should i do?
thank
A while ago I wrote some articles on System.Transactions and the fact that it's almost impossible
Well what would YOU want it to behave then? How else then to use MSDTC when you want one transaction over two connections?
If you would System.Transactions to re-use the previous connection then you must link connections to the current transactionscope and release these until the transaction scope gets out of scope.
And then again.. what about another thread gets released connection before the current thread re-claims it??
Seems to me like an almost impossible job to do in a very leightweight and fast manner.
Just don't drop your connection until your really out of scope for your current task and you won't suffer from this 'problem'.
First a counter-question...
What is the point of System.Transactions when you look at the LTM. I know the advantages for developers and their code, but why was the LTM introduced? Tell me! Because it's only used in a single-connection scenario and then we'd better use TRANSACTION BEGIN
To answer your question, this is the list that Microsoft has given us to know when the transaction is promoted:
1 Resource manager is used without single-phase support
2 Two resource managers are used in same transaction
3 The transaction spreads over multiple AppDomains
This means our transaction shouldn't be promoted, but it is! Are we using another resource managers? And if so, should it?!
When you look at the System.Transaction articles, in the 3rd of 4th I'm pointing to a simple class that can solve the problem. But if it's _that_ easy, why didn't Microsoft build a cleaner solution that's tested and just works?
It should work and it's a known bug, also known as "By design" in Microsoft speak. It just hasn't been solved yet.
Hey!
I have a page where the user clicks a linkbutton, opening a javascript calendar popup. When the users clicks on a date, it inserts the selected value to a dropdownlist. This works and I can see the items being added to the dropdownlist.
Later on I must save data and, when I click the save button, my code behind sees no items in the combobox (Me.lstExceptions.Items.Count is 0)!!! This means that I'm changing the items on the client-side, but cannot syncronize the changes to the server side, failing to save the changes. I believe that I must explicitly set EnableViewState=True to solve this... Is this correct?
I just wanted to thank both Dennis and Ralph for your examples. By attempting to create simple example in different ways, you appeal to varied audiences. Looking at both of your examples will has help get closer to delima I am faced with with.
On my WCF Introduction post I received a trackback to an example that should be really simple to start
What LTM is seeing when two SQLConnections are opened is two different enlistments. There is no way at LTM level to tell they are enlistments to the same datastore. In an ideal world, the second connection should detect there is already a connection enlisted with the transaction and not enlist again.
As for advantages provided by LTM, it provides the same programming model for both single-connection and multiple-connection scenarios. It also allows future enhanced versions of System.Data or other database drivers to improve their lightweight-ness without the need to change the user code.
"As for advantages provided by LTM"
Then Microsoft should've told us that. I still see new (!) articles in MSDN Magazine not discussing the 'issues' that are definitly there. The single programming model isn't caused by the LTM, as far as I'm concerned. It's System.Transactions that does this. But by telling everyone how cool your LTM is, people might believe they have ultra-fast transactions, while probably every time they have MSDTC transactions. And you and I both know it's not easy switching programming models. And believe me, not a lot of people know that they're using MSDTC transactions or care... They'll probably only look when they already have performance problems.
And while you say it's not easy, a Microsoft employee already presented a way around (blogs.msdn.com/.../532026.aspx) so why can't you add the same way around in System.Transactions or the LTM?
I wouldn't normally make a WCF project as only one project, so the example of two projects is useful. However, Ralf's example showed how it could be done in a multi-threaded way - something I would not have known to do. Thanks to both of you.
wij gebruiken Serv-U gemakkelijk om snel in 1-2-3 een accountje te maken met de nodige rechten. Je kan ook een tijdspanne aanduiden zodat na die tijd alles voor die account gewoon verdwijnt en bovendien is er een remote management console voorzien
Mike Blaak,
I am encouraged to see your comment here. We are attempting to implement a Business Process like Accounts Payable using WF in combination with Sharepoint 2007. The MSDN documentation is restricted to sequential workflows in web environment. Any help is appreciated.
Best Regards
Aru
This feature is not new, at all! It is at least 5 years old, it was already included in my Office XP...
Don't just make that statement, tell me where! :)
I've never ever seen it and I believe this was one of the new features presented on a blog, but I could be mistaken
WCF example application using headers to pass information between host and client.
The following is an example of passing information in WCF's operation context message headers. In
Pingback from University Update-Microsoft SQL Server-Cannot drop database because of replication
Seq WF has a start and end points but state machine does not usually!
based on that take your decision.
Regards
Ik ben net begonnen met visual basic 2005
ik heb overal lopen googlen maar kon nergens hier iets over vinden
Ik heb een command button gemaakt en die wou ik graag linken naar een website. Wat ik wel kan is met de shell execution een programma of bestand openen maar hoe open ik een website?
Alvast bedankt
careliyim@gmail.com
As said before , we're currently on location at the "middle of nowhere", creating material
I hope you have time to play some games!;-)
Jeff's suggestion worked like a champ. Thanks Jeff!
When you've seen (and done) z80/68000/x86 assembly, C/C++/VB6/C# (VBA/VB-script/Jscript), Win32/(D)COM(+)/.NET and MFC/ATL/.NET(1.0-3.0) Fx and Programmers Workbench/Visual Studio 1.0-8.0 you just know that enough is enough!
I'm there right with you. NO MORE!
:-D
What does it mean to be to be ALT.NET? In short it signifies:
1. You’re the type of developer who uses what works while keeping an eye out for a better way.
2. You reach outside the mainstream to adopt the best of any community: Open Source, Agile, Java, Ruby, etc.
3. You’re not content with the status quo. Things can always be better expressed, more elegant and simple, more mutable, higher quality, etc.
4. You know tools are great, but they only take you so far. It’s the principles and knowledge that really matter. The best tools are those that embed the knowledge and encourage the principles (e.g. Resharper.)
source = laribee.com/.../altnet
Yes, this option is nothing new.
How to get to it in previous versions:
Slide Show > Set Up Show... > Show Presenter View
Pingback from University Update-Microsoft Visual Studio-Just to late: WF & WCF beta 2 samples
Pingback from .Sitecore » Running trough my bloglist
I thought that alt.net was a combination of tools which people use instead of the standard MS stuff so:
Testdriven.net, nant, mbunit, Castle, etc
instead of VSTS bits.
@Micha, Marco Stolk sums up the list you are measured against. (No idea why he did this though ;)
It's too bad they already added a list of technology related stuff. They should've instead kept this empty as in 3 years open source and agile could very well be ... well, let's just say "sooooo 2007" ;)
Iam using Beta 2 For the Orcus. Any Idea / Steps How do I Invoke the test client for a service created and Hosted in IIS?
Amol
Hey Dennis,
Love the technology, now I can pretend I put lots of thought into the next round of birthday presents for relatives, without having to cover my carpet in glue!
Ript should also stop me from cluttering up my desktop with .txt files on a million and one subjects.
Trackbacked at: tiedyeina.blogspot.com/.../ript.html
Cheers,
Ian.
Thanks for ur example.
My quest for understanding WCF finally ended by ur example.
This theme is definitely an improvement compared to the previous one. Good work!
Indeed, it looks good :) especially the header, nice buttons :)
Looks kinda nice Dennis! Keep up the good work...
Pretty nifty tool. I'll look into that, especially now that I'm taking more and more pictures (because of my new camera ;) ).
msbuildtasks.tigris.org
??
I've got those, but they only have 1 task to check on changes in a workspace. I need tasks to checkout, checkin, etc.
I like it :)
I am an electrical engeneer student from Chile.
I have to design a device who mesure the power and that can put the datas on internet.
In particular my job should be to design the internet conncetion.
Do you have any idea of the way i can do that?
thanks
roberto
c20ster@gmail.com
No I don't... A device isn't neccesarely mobile so maybe this isn't what you're looking for. There are so many things I don't know about the requirements I couldn't give you anything as for how to solve it.
Sorry :)
Ik heb weer een vraag :D
Ik ben bezig geweest met een M-Player in visual basic 2005
Maar omdat een player niet zo windows achtig maar meer zoiets als windows media player 11 moet zijn wil ik overstappen naar
Auto Play MediaStudio
Maar nu zit ik weer met dat
if en else commando
In visual basic werkt het als
If listbox.text = "" then
.....................
Maar in autoplay media studio kom ik er niet uit is er iemand die mij a.u.b kan helpen want ik zit er al meer dan 12 uur aan te goochelen
Please HELPP :(
E-mail: careliyim@gmail.com
You should check the scripting guide.
www.indigorose.com/.../ams60
In 2 minutes I found out the following
if "dennis" == "Dennis" then
-- this will never be executed
elseif "dennis ~= "Dennis"
-- this is always executed
-- because ~= ignores case sensitivity
else
-- this won't happen because the previous was true
end
this works only if you work white 1 command
but what i want is
Select a item in the listbox and everytime a difrent name in the listbox is selected the button will make a differend command
Example
Listbox items
shutdown computer
Close application
When in the listbox the item shutdown computer is selected the button wil shutdown computer
When in the listbox close application is selected
the button will close the application
I can't see anything like this in the scripting guide
Thanks for taking the time Dennis
Hope you can help me white this
Can you run WcfTestClient.exe from VS 2005? Is there a way to download and use it or is it only for the 2008 beta.
Thanks,
I have no idea if it can be run from VS2005. It's available in .NET 3.5 so it might not be. I haven't checked yet if it has parameters or anything. VS2008 does have to provide the info to the tool, so it might. I'll have to check it out yet. Maybe I'll write some more about it.
Although in time I didn't like both tools as much as before though. Console apps still rule my world.
Jeffs comment works superb for NewValues, I guessed a way to extend it to fill OldValues, mind you, it didn't take much imagination:
gv.Columns[i].ExtractValuesFromCell(e.OldValues, cell, DataControlRowState.Edit, true);
Cheers Jeff
That's good news! And I don't mean you write all your training exercises without using tests ;).
I can't wait to use VS2008, so I guess I'll have to go and set up a virtual PC image...
I've found two excelsheets, where you can test your units.
sourceforge.net/.../vbaunit
www.richardjones.info/.../downloads.html
Bye
Hello there....I'm Evil_T0NY (as the INTRO to my Video starts off!)
I would like present to you all of you Team Fortress Bloggers/Readers/Viewers to take a look at a CUSTOM video I had made of Myself (Evil_T0NY) interviewing the Heavy Weapons guy of Team Fortress 2
Hope you ENJOY IT
<a href="teamfortress2.pcgamearticles.com Team Fortess 2: Heavy Weapons guy WITH Evil_T0NY!</a>
Worked a treat, thanks.
The client can be run from VS2005. Only VS 2005 is required. You will, however, uncover several issues with this setup. VS Orcas contains several improvements such as auto attaching the debugger to services. You have to do all of these things manually in VS2005. That’s why we chose to ship the tool only in VS Orcas.
Very nice example with explanation
jeffs comment did not work! :( yes i get some values to e.NewValues but unfortunately they are not the NEW ones. they are the old ones. I am stuck here!
Not until I see my mom SHIFT + click or CTRL + click. Once that happens I'll drop the target attribute like a bad habit.
Hehehehe... Have you tried EXPLAINING her?
And how does she currently open websites in a second window when the target isn't there? And perhaps she just finds all these windows popping up irritating like ... Kinda like I do! ;)
I had taken this online typing test before on a laptop while sitting on the couch. Tonight I was sitting
I know its not the point of your article, but did you know you can 'middle' click your mouse wheel and open pages in a new tab?
@Brian : No I did not know that! Thanks!
Probably there is no complete solution for these spam comments or messages. As far as Spam Filters are concerned, I always use to feel that Spam Filtering may reduce the number of spam for a short while but you cant say that it is an ultimate solution to Spamming. The reason is that the Spammers are aware of these filtering techniques whether it is Filtering with BogoFire, Akisment or some other. There are many websites available that are providing the information on Anti-Spamming Solutions but most of this information is either irrelevant or not useful. I have recently visited a website that I would like to suggest
<a href="http://www.anti-spam-info.com" title="Spam Filtering">Spam-Filtering, Comment Spam, Anti-Spam, Anti-Spam Solutions</a> Website
First of all, you can control your build by editing the TFSBuild.proj file in the source repository (at least in TFS Orcas, back me up on 2005)
Second off, all the custom tasks can be found in C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets
Yeah, I know...
But do you use Continues Integration outside of Visual Studio/TFS? Because I'm on TFS v1 and CC isn't included. So I'm using CruiseControl.NET but it's very hard to run and test this. As far as I know, it must be done on the server itself and cannot be tested locally... Kind of a bummer, as you screwing up the build when you're adding new stuff. And besides that you might also mess with other build process along the way.
That's why I chose to stay of TeamBuild and stay with MSBuild for now and ignore the TFS build possibilities until I find a better way.
Souds great, but is there also going to be a non-hotel version?
Like just in Barneveld or so?
It will be easier to attend for developers with kids...
The trainers for the .NET 3.5 class are Alex, Pascal and me. We respectivly have one, two and three kids and we'll definitly be there! :D
Sorry, but there isn't going to be a non-hotel version for now. We will be redelivering this training, but probably in custom versions and there might not be a complete update to 3.5 training like this is. We're definitly covering everything there is to talk about. :)
Hi... Dennis
I started 3.0 recently and was confused how to start the WCF. Your article is so helpful
I am new to TDD and I've found your presentation very helpful. Thanks!
No problem, glad people still find my stuff helpful! :)
Hoi,
als je wilt kun je via http://xml.fileindex.nl een actuele en zeer uitgebreide filemelding van NL zo gebruiken (onder bronvermelding). Wellicht handig voor je tool. Verder leuk.
Groeten
Stefan
Pingback from icon » Wat zegt Dennis?
I couldn't use the example until I had installed not only Visual Studio 2005 and .Net Framework 3.0, but also the "Windows SDK" for .Net (Vista version) and most importantly "Visual Studio 2005 extensions for .NET Framework 3.0" available at: www.microsoft.com/.../details.aspx
Neither this example nor anywhere else I looked explained that.
I can't help wondering where the world will be in 5 years when everyone needs to upgrade from WCF and we are all captive the black magic of this technology.
@Pasquale : Just updated the article, you're right, it should've been in there. Other people can thank you for it now. :)
However, you don't need the SDK and your link is to the WF extensions, not the WCF/WPF extensions.
Right, I'm told both WF and WCF/WPF extensions are needed. Here's the link to the WCF/WPF extensions:
www.microsoft.com/.../details.aspx
Great, Just one word.
ThankYou
Great game indeed. Unfortunately I got myself the 360 version. Let's hope additional maps will be available on live soon.
Thank your example, it is pretty helpful and clear to understand the WCF structure in inline code.
you are right, To separate the host and client to different projects makes the route and the concept much more clear, even I modified the binding address from 'localhost' to other '192.168.xxx.xxx' and run the service on other machine, it will be better.
one thing need notifiy is service reference name 'localhost' would be customized to other name by changing the reference name or in its property, it made me confuse at the begining.
Do you have other example using IIS to host the service,config and expose it in web.config? I would like to enjoy it.
Kenny, good idea! I'll create an example and tutorial for that. But it'll probably be next week.
how many keystrokes is 4000 worrds per minute
Ryan's comment about OldValues didn't work on mine.
Both OldValues and NewValues are New ones in this way.
I also check back regularly to see if the Weighted Companion cube is in stores yet. I already bought the Portal t-shirt. I was a bit disappointed that it was so generic and the logo "now you're thinking with portals" isn't nearly as good as "the cake is a lie".
The still alive song is from the companion cube. Not from GladiOS. (final boss)
Normally I get flooded with messages about stuff like the official release-date for .NET Framework 3
Sam Guckenheimer (product planner for VS) stated last week in Redmond that he expects VS2008 to be downloadable from MSDN in November and general availability before the end of the year. This wasn't an official statement though.
The launch date is February 2008. But launching and releasing are completely separate things for Microsoft.
Hi Dennis
Thanks for reading :-)
Can you be more specific about the setup issue? AFAICT, setup projects work fine both for v2.0 via VS2008.
Daniel
I created a .NET 2.0 application in VS2008 and made a .cab file and a setup project so I could run the setup on my desktop. I developed everything in a VPC (yeah, the one that expired 1/11/07 ;) and copied it to a non-.NET3.5 machine and ran the installer. The first thing it tried to do was install .NET 3.5 on my desktop.
When you created the setup, did you change the combobox in the properties to indicate v2.0 instead of the default of v3.5?
As far as I know, I double-checked this, because after noticing the installer was .NET 3.5, I created another installer, to recheck this.
But as always, when you're asking, you can't be too sure! ;) But I'm 99.9% sure that I did change the combobox to .NET 2.0.
lyrics:
you broke my heart and killed me
and tore me to pieces
and threw every piece into a fire
sounds more like GladiOS to me
VS2008 will be released before the end of November 2007 (from TechEd Barcelona 2007 keynote). I've heard rumors of .NET 3.5 being just before that release. VS2008, Windows Server 2008 and SQL Server 2008 will have a combined launch on February, 27th 2008. Like Erwyn said: Launch != Release. ;)
Alex
Dennis, I just wanted to confirm that you are able to create setup projects with .NET 2.0 only, in VS2008.
•Right click on your setup project – View – Launch conditions
•Select your .NET Framework Launch condition
•Open properties (F4)
•Version is the fourth property; it is a drop down which you can change to the available versions.
When you get the RTM bits, let me know if you still face an issue.
Ha Dennis,
Ik ben nu juist op zoek naar de PPT iconen!
Zou je ze met mij kunnen delen?
Alvast bedankt!
Rutger van Hagen
rutger(@)vanhagen.eu
ik probeer dus een media player te maken met visual basic. als ik dit opzoek op het net dan krijg ik altijd helpfiles maar dit is allemaal met windows media player 5.0 of 6.0 ofzo. nu zitten we al aan media player 11. We kunnen die niet verwijderen omdat dit bij de windows hoort...
suggesties?
danku
It's amazing to see how many people can find this blog entry via Google but don't provide any comments or anything! :)
Man, is VS2008 fast on my new laptop. :)
.NETCF development is an even greater joy for me now!
Yes i ran sn.exe -Vr svcutil.exe but now i get the error "Error: Cannot obtain Metadata from localhost/.../mex"
this comes from a wcf project where i press run without changing any of the generated code.
Microsofts needs to get it's act togeather as it relies on to much black magic to get things working
When Microsoft takes a great idea from someone else, they always enhance it. They call this "borrow
I have a zune player.I just want to know how to convert various video formats into WMV format.Is this software free.
Dan, I have no idea. I used commercial software but found it hard even with software that was called "DVD2Zune" or "AVI2ZUNE" convertors. They converted to something, but when syncing the converted files with my Zune Player, it started converting them AGAIN...
I got an e-mail with the question how to turn off automatic checking for updates, when you're doing
Yeah those are GlaDOS's words, not the cube. The woman who voices her said so in the developer commentary.
Hey Drew, take a look at these portal t-shirts:
www.edwardchase.org/.../portal_shirts.html
The code of Programmatically must apply the baseAddress
like this:
using (ServiceHost host = new ServiceHost(type, baseAddresses)){}
But you only do it like this
using (ServiceHost host = new ServiceHost(type))
V, you're right, thanks...
I totally agree with you, this is a must read for everyone who is into pair programming, tdd and patterns and principles.
If you talk about single responsibility, you talk about object modeling, if you talk about object modeling, you talk about: Object Design: Roles, Responsibilities, and Collaborations [www.amazon.com/.../ref=sr_1_1]
Hmmm, I could probably get rid of either the foundAt or startIndex variable.
Why not just compile against .NET 3.0? It's backwards compatible, right?
They're not (just) backwards compatible, they are exactly the same. It's a single runtime for .NET Framework 2.0 and upwards. Again, in .NET Framework 3.5, you're still coding against the .NET 2.0 Runtime!!!
In .NET Framework 3.5 however, you get a much smarter compiler and a lot of library classes.
Just start a new project and choose Console Application in .NET Framework 3.5 !!! The project template automatically adds System.Core assembly. Remove it and do a single Console.WriteLine("Hello world from a .NET 3.5 application.");
Now compile and copy to a computer with .NET 2.0, but without .NET Framework 3.5
For those that are still curious after my previous post about using C# 3.0 features in .NET 2.0 . You
I do understand that the difference between 3.5 and 2.0 is just the class library and the compiler, thats what makes it "backwards compatible".
But still, my question remains, why should you go through all the trouble of creating your own ExtensionAttribute, LINQ classes, etc? When all this is available in .NET 3.5?
Re: Ricardo Pinto adding items to a Drop Down List.
I don't think you are going to get anywhere with this even if you set the EnableViewState property to true.
This is because the normal HTML form post data does not include all the values in a drop down ... only the selected value.
Your best bet is to add the data to a text box or hidden form field and then parse it on the server.
If you need the user to simultaneously select one of the values then also add it to a ddl for selection. But you will have to use the Request.Form technique described above to get the selected value.
Hope this helps but since you posted a long time ago I'm sure you have sorted it out yourself by now!
Because almost no one is building using .NET Framework 3.5 yet? Still a large amount of our customers are working in .NET 1.1 !!! Of course not anymore after we've left ;-)
I have a gridview in which I have 8 templated field columns which are dynamically created and has only OnDataBinding event attached to them. Besides I have 4 bound field that were created at design time for the page which are sortable. When I sort, even though I remove the templated columns and re-add them still the grid shows only the 4 bound fields and everything else is empty (i.e. the data rows). This is I think due to the OnDataBinding not getting fired for the templated fields on sort. Any help is appreciated, as soon as you can, since I have a monday deadline (12/10/2007). Thanks and you can respond to pankaja_shankar@ml.com
3.5 is based on 3.0 which is based on 2.0... try to use WCF in the console application and run it on framework 2.0... outch!
Pingback from What is a good way to specify requirements? | Technology
I blogged about new Unit Testing features in Visual Studio 2008 , but missed the following features back
This post is really interesting. I'm researching on clickOnce to see if we can using in my job. Everything looks great, but I have a problem. For some policies of the company, I need to change the installation path. I can't have clickOnce to install my apps per user in the cache folder. In my research I found that this is not possible. So I wonder if I can make a classic msi installer to setup the app for the first time (and have it installed where I want), but still using clickOnce for checking updates using your code example.
How can I make the app to 'think' that has been deploy using ClickOnce, so the NotDeployedViaClickOnce status says so?
Is this possible?
"It makes me GLaD I am not you"
"I am doing science and I'm still alive"
"We just keep on trying until we run out of cake"
Yeah, it's definitely GLaDOS
Pingback from The Promenade Blog » Blog Archive » My Nerdy Christmas Tree
One or Two project samples are nice so long as it's short and simple like this one and i don't see what the fuss is about.
Alan, what do you mean with 'the fuss'?
@Alan: You have to have your mex bindings in place... You can easily add them with WCF Service Configuration Editor.
Tools -> WCF Service Configuration Editor -> Ctrl+O -> choose your web.config file
In the editor, choose Services and click on Create a new Service Endpoint... -> Choose the contract you want to expose -> Existing binding configuration, choose the appropriate mex* binding -> choose the endpoint address (can be the same as your contract endpoint) -> Finish
I just used this where my template field is a lable
GridView grd = (GridView) sender;
Label lbl = (Label) grd.Rows[e.RowIndex].FindControl("lblempIDe");
now use the
lbl.Text
to find the value
Dennis already blogged about it : we had some problems with the availability of BloggingAbout since last
Pingback from flitsers | Dot info news
Pingback from Stephan Sokolow’s Blog » More Portal Fun
it was very helpful. since few days i was facing this issue.
WARNING & DISCLAIMER: This is a long post, split over a series, as it discusses some old, well-entrenched
Thanks for the article, it is exactly what I am looking for..... Unfortunately, I am not that good a coder, and do not understand exactly where to make these changes.
I also cannot find where MS Studio makes the wizard changes (other than in properties).
I thought that if I found the default stuff set up by the wizard then I should be able to overwrite it with the delegations you have written above.
Would you be able to post an example forms C# project, that shows exactly where you place this code.
Apologies in advance, if I am being terribly simple and the answer is obvious.
Douglas
Hi Douglas,
I'm giving a training today. If I find the time between practices or so, I'll create and upload a solution.
Pingback from Manual check for updates with ClickOnce - Dennis van der Stelt
Seems like I did it faster than I expected. I added the example for VS2005 without the BackgroundWorker.
The link is just below the article, as UPDATE 2.
If you want one with the BackgroundWorker included, or anything else, let me know.
i had one problem that is when we click the edit button the updating template is coming but not refelected in the database
I was googling for a solution for the problem as described in the referenced article, concerning the "Launching Application" dialog.
Indeed, when un-checking the "The application should check for updates" check, the dialog is supressed until I call the CheckForDetailedUpdate() method in the ApplicationDeployment class. If I choose not to update the application, the dialog is back when restarting the application.
Is this a bug or am I missing something here?
However, nice walkthrough!!
Jeroen.
I am using visual studio 2008. I have two questions regsrding this feature of hosting a WCf service library and text cleint.
1. is it possible to disable this feature of automatically hosting while debuging? i am hosting all my services in another project, so i need to disable them.
2. is it possible to use this service host in run time, that means do i need to host services separately or can i use this feature for hosting all my services?
Pfew, I had almost uploaded Reflector, but than I saw this link at the bottom
www.microsoft.com/.../cpyright.mspx
;)
Considering I've put a few posts up about LINQ To SQL, I realised I've never shared some of the
You couldn't find a link anywhere you said. That led me to believe you would actually supply one yourself. Its in the picture ofcoure, but nothing clickable ;-)
www.visualstudiogallery.com
Hahahaha, my bad! I'll update the post! Thanks! :)
Personally, I wouldn't do that. The protection I get is worth 1-2 extra clicks per day. "Protection" is also the awareness of new software I install in terms of their admin demands ;). BTW, if you are getting more than 2 clicks you should consider an elevated cmd where you do your admin stuff.
Additionally, note that with Vista SP1, the number of elevation-related dialogs is reduced for file system operations :-)
Finally, the only thing I personally tweak on secpol.msc is the "switch to secure desktop" - that is truly annoying!
Hasan,
1. I don't know but I don't think so. You should however create a class library instead of a WCF Service Library.
2. I'm not entirely sure what you mean here. Do you want to use this host on production? Is that wise? Because how would you be able to monitor that host, see when it fails and why? If you mean starting it seperately from VS2008, I don't know. It might be possible, but I don't know how.
Good One
yes, but is software is the kind of product to promote with models !!!
maybe if i met Sare at DevConnection i may have changed my mind, untill then :)
It's been a while since I blogged about one of my favorite topics, Windows Communication Foundation
Pingback from WCF Part 0 : Introduction - Dennis van der Stelt
Pingback from SDNET - all about .NET and computing ?? Url Redirect and IIS7
Als de data al in de DataTable zit dan zie ik eigenlijk niet echt de meerwaarde van LINQ niet.
Maar dat kan aan mij liggen.
foreach DataRow dbrow in dataTable.Rows
Console.WriteLine (dbrow("ClientName"));
of iets dergelijks.
Pingback from New Technology » Blog Archive » MIX08 announcements
Pingback from New Technology » Blog Archive » New Technology ?? Blog Archive ?? MIX08 announcements
Pingback from New Technology » Blog Archive » New Technology ?? Blog Archive ?? New Technology ?? Blog Archive …
Pingback from Movies and Film Blog » Getting started with Silverlight 2
Good one it helped me a lot thanx
but can u provide the steps for WCFClassLibrary also
Hello Jeroen de Zeeuw, I've the same problem. It behaves like a bug.
Did you find a workaround?
Nice sample!!! yes this is what i have been looking for too, nice and simple. would you happen to have a WF State machine simple sample too?
Hi
Is it possible to set MSMQ message priority at client?
this is nice useful feature. However, there is it possible to have default value to a properties ?
equivalent to:
private string _title = "Hello";
public string Title
get { return _title; }
private set
_title = value;
I have something against setting these values in class-scope. Just doesn't feel right! :)
My way would be to do it like this:
class MyClass
private string _title;
// constructor
public MyClass()
Title = "Hello world";
set { _title = value; }
which in automatic-property world would result in
public string Title { get; set; }
Nope, that's only possible with the msmqIntegrationBinding. But know what you're choosing for when selecting that binding. Is it really neccesary to set message priority?
Trying to use this with VS 2008 and I cant seem to set the ref to the host service while it is running. Any ideas? All the options on the Client project are grayed out when the host is running.
Jeff, check out the following post I just wrote for the solution:
bloggingabout.net/.../quot-add-service-reference-quot-is-disabled.aspx
Thanks for the quick solution!
Some of us have built up quite a history over here, which might cause them to stick around. I think that bloggingabout.net won't get (so much) new bloggers when there's going to be a monthly fee to be payed. And I think there might be some of us that will leave BA.
As you know I've thought about setting up a blog for myself / leave bloggingabout. There are several free weblog providers available. And although something like 10 dollars is not much, it might be enough to push some of us away.
Kind regards.
nice april fools message by the way ;)
GOTCHA! :)
Ik vind em persoonlijk ietwat misplaatst als 1 april grap maar goe ...
I think it is a great joke, it even looked for real when read on april 2nd. :-)
Hé Dennis,
Long time no see!
Dacht, ik geeft "Dennis" een kans op mijn HTC p3300.
Helaas... ik krijg de volgende foutmelding:
Fetching data...
Something went wrong! An error message cannot be displayed because an optional resource assembly containing it cannot be found
Enig idee?
I know, I know...
The application does screenscraping somewhere and the HTML on the page changed.
I'm working real hard on a new version that uses a WCF service to get its data. Then when something changes, I'll only have to update the service and not all clients.
So until then, you'll have to wait...
Sorry.
Thanks Dennis!
ghehe! Priceless, you fooled me :)
Is this deployable to other computers? (other than your own dev computer?)
If not, how would a deployable Windows Service be made?
Yes, this should be deployable on any machine running .NET Framework 3.0
i got the companion cube to talk on the ps3 version
if you pick it up and drop it real fastrepeatedly after you beat the game numerous times it will say "ouch that hurts"
You can make them out of paper
Check out rapidshare.com/.../weighted_companion_cube.pdf
rapidshare.com/.../weighted_storage_cube.pdf
Is it possible to Unit test C++ unmanaged code in Visual Studio 2008?
Thanks... quick and easy.
Where did my Property Snippet go in Visual Studio 2008?
i just got a zune and i cant put songs on it they dont play well please help me the songs dont even know how to upload them
Hi Tulasi, sorry for the late reply...
Unfortunatly not.
It's possible for managed code though, read this article for more information:
www.codeguru.com/.../c11893
Great news! Now I can enjoy BlogginAbout.NET even faster then before \o/
By the way: http://dennisvanderstelt.nl is looking great!
How can I manually specify the update location.
The application will be installed in multiple clients where internet is not available. So I need the administrator of each of our clients to manually copy the files to a specific location so that all clients can be updated.
If you want to know, this was my upgrade script:
1. Place app_offline.htm
2. Copy all /web/ files to website
3. Convert
4. Check for non-copied files in centralized storage
5. IIS7 Integrated Pipeline (give site its own app pool)
6. Bit of web.config
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true" />
</security>
</system.webServer>
7. delete faulty users from removed communities
SELECT *
FROM cs_SectionMembers sm
join cs_Sections s on sm.SectionID = s.SectionID
left outer join cs_UserProfile p on sm.UserID = p.UserID and s.SettingsID = p.SettingsID
WHERE p.SettingsID is null
DELETE FROM cs_SectionMembers
inner join cs_Sections s on sm.SectionID = s.SectionID
8. delete /golfcoasting/ en /default/ in /themes/
9. Turn off Groups until I figure out what's added to the community.
The download does not work. Great article.
Tom, thanks for the comment... I'll look into it.
Thanks for the article. It's a nice summary on the subject. Hosting a service in a windows service is also the thing I'm after (that is, in windows server 2003).
Worked a treat with SQL2000, I backed-up secondary PUBS to disk then restored, changing the name.
There is nothing that System.Transactions can workaround for this matter. System.Transactions is doing what is supposed to do: promote on the second enlistment; this is required in order to ensure the ACID properties for two different enlistments. The workaround or fix will have to be done in System.Data. Hopefully the latest update (blogs.msdn.com/.../extending-lightweight-transactions-in-sqlclient.aspx) solves most of the cases.
PS: one thing I don't like about commenting on blogs is that I don't get notified about someone responding to my comment; the chances that I will come back to the page are small without a notification
I had other issues with Vista SP1, VS 2005 and IIS 7 and I have written a post here developershelf.blogspot.com/.../problem-loading-iis7-hosted-wap.html
Your articles look good. Your zip file for this project seems to be corrupt or the upload was broken. Could you please upload again? Cheers
The main issues I have with ClickOnce are the install directory and config overwrites. Let's assume I want my users to be able to manually update the app.config - firstly, how do they know where it is? Secondly, what happens on next update and I have made changes to the central copy - this would overwrite the customer's changes.
I've looked at lots of ClickOnce articles and have still not seen a satisfactory solution to this problem.
just wasted 3 hours and you helped me with a 2 second fix. Thanks
Great article. I like simple.
Great example, but I think you have a small error in this line:
OleDbDataAdapter dataAdapter = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn);
I think "strConn" should be "connectionString".
Thanks again,
pt
Great one, It was really helpfull
Hi!
I have problem.
i's my function delegate.
void GV_RowUpdated(object sender, GridViewUpdatedEventArgs e)
rowID = e.RowIndex;
wartoscId = ds.Tables[nazwa_tabeli].Rows[rowID]["Id"].ToString();
GridViewRow row = GV.Rows[rowID];
drCurrent = dt.NewRow();
drCurrent = dt.Rows.Find(wartoscId);
drCurrent.BeginEdit();
drCurrent["Pole1"] = ((TextBox)(row.Cells[2].Controls[0])).Text;
drCurrent["Pole2"] = ((TextBox)((GridView)sender).Rows[e.RowIndex].Cells[3].Controls[0]).Text;
drCurrent.EndEdit();
OleDbCommandBuilder objCommandBuilder = new OleDbCommandBuilder(adapter);
adapter.Update(ds, nazwa_tabeli);
GV.EditIndex = -1;
GV.DataBind();
It's ok but value drCurrent["Pole1"] it'S STILL old.
How I can get new value?
Pingback from turn off automatic update notifications
if you dont have vista/4.0, how can you know which messages are your's when playing back a dead letter queue?
Nice simple article. However, I ran into a gotcha immediately:
"HTTP could not register URL http://+:8080/. Your process does not have access rights to this namespace (see go.microsoft.com/fwlink for details)."
Apparently, metadataexchange requires elevated privileges? Is this something I am getting because this is VS2008? Vista Ultimate? Any ideas on how to be able to tell Visual studio to debug with elevated privileges?
David
First of all would like to thank you for such an encouragin example;
and am sure this is just a begining would like to have more detail and indepth use of WCF, could you just let us know that how wsdl and wcf are inter-related with each other and more inportantly scenarios suitable for WCF...
thanks again and expect such articles in future as well...
Personally I would change the snippet type to SurroundWith, so you are able to select the code you want to measure and then surround it with the snippet using CTRL+K, S.
You're right, I'll have to change it... Thanks!
Nope, gotta do it. I went around and hit Google for some links. At this point the key links...
Thank you Dennis for this post. You are absolutely right that the State Machine WF really should be the most natural one to use in the myriad examples MS and others put out. After all, the biggest benefits of workflows come from implementing <strong>long running</strong> processes in organizations. Limiting most examples to simple sequential WFs really undermines the perceived power of the toolkit (especially in the minds of people who have not delved into WF development before).
very very nice and clean article. good starting point for studying WCF
How to get the values of gridview cells in
a button click event when the grid view contains both boundfields and template fields
@David : It's a Vista 'problem'. Run VS2008 as administrator (which I always do), or check out this article : blogs.msdn.com/.../addressaccessdeniedexception-http-could-not-register-url-http-8080.aspx
@Amit : There are more articles on my weblog, just click the "WCF" tag in the tag-cloud.
I'll make a post about WSDL and MetadataExchange in the future to try and explain it the simple way! :)
For now I can say the "WSDL" is the "WebService Description Language". You can enable it via the metadata service behavior. WSDL is like an "addon" feature on MetadataExchange so that consumers (clients) that don't support metadataexchange are still able to retrieve the WSDL.
Where shall we meet? :)
Hi Hasan Akram,
Yes you can disable the service host.
blogs.msdn.com/.../disabling-the-visual-studio-service-host.aspx
Is automatic property assign default values while initialing property .In old property we can do it by setting default value to private value
Thank you very much.Its really useful for beginners in WCF.This real time exmaple helped me to understand better.
I just wanted to give you a heads up of some updates we’ve made to the Visual Studio Gallery (www.visualstudiogallery.com) to support RSS feeds, Tagging, HTML editor for details pages and other new features.
I am new to WCF this example has helped to understand how WCF works... Thanks very much Dennies.
Thank you for the mention and for the kind words about Waegis. I hope that you have a good experience with Waegis for a long time.
Please let us know about any problem or any suggestion that can make Waegie better.
Great example! This is just what I needed to get started with IIS 7.
Thank you, Simple example has helped lot to understand WCF
Very good article.For the first time i have been able to run WCF.
Thanks a million. I am a newbie to the WCF and simply couldn't get a clue of how and where to start. Your simple example gave me a solid starting point. Once again.. thanks a lot and keep up the good work.
Well i have made my own companion cube and i take it every where with me, why spend all that money when they only cost may be £2 to make and they sell them for something stupid like £24.99 ridiculas i made my cube from wax, yes from candle wax and it stays with me all the time :-)
Never had to deal with creating PDF myself. When I needed that, I usually could create a report with (sorry Dennis) Crystal Reports or Reporting services. You can tell those applications to export the result to PDF format. I obviously have no idea what cound of documents you need to create, but I think that one of these report engines should be able to handle that for you.
In my current project, we need to report monthly reports to operating units for my current client and we do that by generating a PDF using Reporting Services. We even send those reports out to management at the operating units using the SMTP support in Reporting Services.
Come to think of it, you are reporting from a database. You export tables. Sounds like a reporting engine will suit you just fine ;-)
I start itching when I think of Crystal Reports or SSRS! ;)
Currently I need to generate thousands of PDF documents automatically on a server and place them all in a folder.
In the future I will only generate a few each day and e-mail them automatically.
I too have been in the situation where i needed to create PDF documents.
I ended up using the component ABCpdf from websupergoo you can find a trial here.
www.websupergoo.com/abcpdf-1.htm
We are using two ways:
1) Having a report, which is retrieved as PDF from the SSRS using the webservice.
2)Aspose components: word templates with mailmerge functionality (Can give param arays or datatables), and SaveAsPDF option to export the generated document to PDF for downloading(, HTML for emailing or DOC for printing)
The first option is in use to generate the monthly invoices for customers, (thousands) and is working very well.. (Except for the initial report designer part).
The second one is very easy in creating new document templates (just use word and mailmerge fields).
HJ Meulekamp
@HJ : But than I'd have to install Word on the server? Not something I'd prefer.
My preference is a good PDF library for 100% total control and extra PDF features. Creating links, annotations, etc, etc, inside your PDF documents.
But it's awefully slow and there are all sorts of problems that every library has. Bugs and/or features that just aren't possible.
Not at all, no Word or office components required. You just reference the aspose.word and the aspose.pdf library and thats it, two files extra in your bin folder. (we have a site license embedded as resource into our client library which is using the aspose components. Site license was about 2k dollars, but this is covering distributing our application (parking/permit system) with embedded aspose license) to a lot of clients)
Check www.aspose.com and check the sample code, as far as I know it has all the functionality for word... (And I'm using the SaveAsPDF only to send the PDF file to the browser) So I have not used the PDF API myself that much to know how easy it is to use advanced PDF functionality.
As far as our concerns go, the word documents convert to PDF nicely, and word documents are very easy to edit to modify tables, links, markup, embedded images etc.
Then what's wrong with using a report generator? Because it sounds like you're creating reports of some sort. I'm assuming the data is supplied by running queries and then displaying the results? What's the special need for you to do it in code? Just out of curiousity ;-)
@HJ : It does look like a very powerfull solution! I'll have to have a better look at this! Thanks for the advise!
@Jan : Currently it's a very basic report. But those PDF libraries have special features like annotions, extra security, forms, merging of documents. We might not use forms, but the other features we will use.
+1 for websupergoo.
If you've tried it and didn't like it please do share what you didn't like about it.
Thanks Klaus vbaunit is good
Apache FOP on IKVM?
Your's was the first WCF example that I was able to get working successfully, Thank you.
I have been trying one example after another in the hope that I could better wrap my head around WCF concepts once I had a working model to play with.
Your example creates a temporary web service. How does one go about deploying the service to IIS 5 & 6?
Appreciate the hand-holding.
Thanks.It's useful to me.
Apache NFOP used in .net seems to be good to generate PDF's we used it and works well, with XSLT .
I have some very good experiences with ITextSharp (itextsharp.sourceforge.net). It suited me very well for simple applications (including table generation etc.).
jtleigh.com site seems to be dead.
Thanks for the great example. But I wonder if you can tell me why my service reference will not update. I have changed the endpoint addresses to a foreign machine's address and I can view the output in a browser when I navigate to that ip. However, when I try to do "Update Service Reference," it errors out. It is not a firewall issue as I can browse to the machine, but what else could it be?
Really this is very nice example for those who started 3.0
can u please give some more examples
thanks and regards
sandhya
>> Seq WF has a start and end points but state machine does not usually!
This is totally foolish. Every state machine had its own initial state and finals states.
Pingback from WCF and MSMQ part 1 « Sukasom
You can try this too:
www.binitex.com/TypeMaster
Thanks for your article. That's what I'm exactly looking for.
I've created an MS connect request to have the old snippet reinstated and also to add initialization to automatic properties. Vote/comment if you're interested!
connect.microsoft.com/.../ViewFeedback.aspx
@abraham: I'll try and post something soon about that.
@Kenneth: Normally you can only see the nice HTML page when going to the service when you're browsing locally on the machine (or server). Maybe you don't have a MEX endpoint on the server so it can't update?
Either way, when from development the service its interface hasn't changed, you should be able to change the url of the service in the web.config or app.config and be fine. You don't have to actually update the service reference, that's just for updating the underlying proxy code, for when you've changed your interface (ie. added new operations, changed parameters, etc).
We use ExpertPDF Html-2-PDF for creating PDF documents. (http://www.html-to-pdf.net/)
What we basically do is serialize an entity to XML convert it with an XSLT (so this is your template) to the HTML layout that you want and than convert it.
Best regards,
Guus
You need to bind your drop down list in the Init event of the page. You can then retrieve the selected value in the load or prerender events.
Turning on viewstate simply allows the selected value to be determined in the Init event.
Using Request.Form(MyDropdownList.UniqueID) is a good way to get the selected value early on in the init event without having to turn on viewstate which creates a lot of heavy overhead. Otherwise, if you can wait until the load or render events you don't need to do this.
hi,
i m trying to use Duplex channel factory along with te to create a IClientChannel to create a pda chat client. both are not support in .net 3.5 WCF. Any one has done a WCF chat app ?
jimi
I am a student intern trying to learn the world of sql database administration and space issues seem to come up frequently. This is a different method than I had been shown before to backup the log with no truncate then use dbcc shrinkfile. Very interesting, thanks!
I faced the problem using SQL2000. Then I took the database offline without problems and I could delete the offline database. The data and log files had to be deleted manualy.
How to get data the other way around? I mean from SQL Server using Linq to Excel. I have tried using a web page to publish the result of the Linq query, and then import using Excel's import from web page. It works but the performance is poor. Is there a way to "convert" the Linq query to a ODBC connection to avoid all the ASCII conversions?
@Niels : Could you be a little more specific, because I don't really understand what you're doing.
If you want to exchange OLEDB for ODBC, I wouldn't recommend that, because normally (I said : normally :) OLEDB is always faster.
But I don't understand from where to where you're importing and exporting stuff. Are you getting info from Excel into a dataset or vice-versa?
Dennis- Don't let the replies sting too much. I've been doing serious presentation work with Power Point since day one and I managed to miss it too.
THANK YOU. I'm involved in a very heavy schedule thru first quarter and this little feature just knocked my socks off!
Bill J
As I’ve said before, years ago on some project I first got the opportunity to work with FinalBuilder
As I’ve said before, years ago on some project I first got the opportunity to work with FinalBuilder.
Can this be a research idea?
This works.. Thanks for your help!
Very helpful article Dennis. It helped a lot :)
Do not use the SessionState to store the information if all you want is the SelectedValue.
Visit
www.harvardinnovations.com/.../DropdownlistEnableViewStateProblem
for a detailed article on the subject
This is the first time i hear about Velocity. Sounds very cool. Hope you can tell us more about it after the PDC ;)
Is there any emulator that can be used on Pc to brows the internet free of charge?
hoodwing@yahoo.com
Pingback from Arjan`s World » LINKBLOG for September 29, 2008
I've used a heavyweight commercial SGML pagination engine for years which supports PDF output but recently we have switched to PDFLib which has become really very advanced and supports very sophisticated tables etc.
It's very much multi platform so although there is a .NET SDK it 'feels' like a C API.
To get the modified (edit) values in Row Updating event in GridView
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
GridViewRow grv = GridView1.Rows[e.RowIndex];
int intPhoneId = Convert.ToInt32(((TextBox)(grv.Cells[1].Controls[0])).Text);
string strPname= ((TextBox)(grv.Cells[2].Controls[0])).Text;
string strMname = ((TextBox)(grv.Cells[3].Controls[0])).Text;
string strCname = ((TextBox)(grv.Cells[4].Controls[0])).Text;
Yes, we used .NET 3.5, LINQ and LINQ to SQL on my previous project. I highly prefer LINQ to SQL over just plain ADO.NET. You can even still use stored procedures with LINQ to SQL if you really want to...
I've used LINQ2XML and LINQ2SQL myself in my previous jobs and projects. .NET 3.5 because of the lambda expressions, anonymous types and automatic properties. It's just a little more comfort, not something I couldn't do without. Hope to learn some more cool LINQ stuff at the Data Access course at Class-A. Won it at CodeCamp 2008 :).
PS, I'm available for a job right now in the neighbourhood of Amersfoort. Anyone reading this, if interested I could send you my CV. Just send a msg to michielborkent@gmail.com.
@Michiel : Congrats! You'll definitely learn more LINQ at the Data Access course!
And rofl at the job you're available for! :) Good luck with it!
We are using 3.5 (ok), and LINQ to SQL (nice), and straight LINQ (amazing) for a new project.
I have been used LINQ to SQL, LINQ to XML and LINQ to Objects on large production enterprise sites for the last 9 months.
Maybe you can use Ibex from XMLPDF. You have to create XSL:FO from database or whatever and feed it to their pdf generator. I use XML from SQL database (for XML) styled with XSL-T into FO. Altova's XMLSpy is also an excellent XML IDE to facilitate XML technologies development.
www.xmlpdf.com
www.altova.com
PS - thanks for your example code WCF-MSMQ.
NHibernate in 80% of all stuff I do with databases. I haven't found any really good reason to use linq2sql or any other ms framework at the moment.
And yes of course I'm using 3.5! Sometimes I open 'legacy' projects and start using 3.x features and wonder why it can't compile :P
I'm using linq *very* frequently but thats more because it makes it sooo easy to process hiearchical in memory data.
We're using .NET 3.5 and Linq To SQL for a new project we're currently working on.
Excellent, been looking for an example of this!
Our apps are converted to 3.5, but we're not using any of the new features yet.
We're using LINQ2SQ, it's really great to have this power directly in the language. Beats the alternatives.
I don't buy the whole ad-hoc queries are just as fast as stored procs, especially complex ones. From my understanding is is all about caching/compiling execution plans, which you again from my understanding you can't do with ad hoc queries. As far as being against logic in your data tier, that is you choice. I think in heavy data centric environments you almost have to put some logic into stored procs for various reasons. One being the database might be more available for changes then the code base. Two with really complex normalized data models good luck trying to put all that logic in code rather then in a stored proc. Often times you will end up making six or seven trips to a database so you can accomplish what could be done with one trip in a stored proc.
My two cents. I don't claim to be either a code nor SQL guru. I think as far as a development choice...more LINQ and less Stored Procs, or vice versa, is really a matter of choice for most developers. Let's face it, most of us aren't pushing the limits of acceptable performance for most projects anyway. Its always a best practice to code like we are, but sometimes cost/time/comfort level/knowledge plays into the equation as well.
Using LINQ for objects all the time, awesome. Sorting, grouping, etc. without it is a pain.
Subsonic: I am a recent convert and quite satisfied
regards
@infocyde : about compiling and caching execution plans, read SQL Books Online and you'll know. It's there somewhere, I don't feel like looking it up :)
Your DBMS is better in working with large sets of data. If that's what you need to do, keep it in the database. Don't get many MB's of data into code to enumerate over the results.
I put 99.9% of all logic in my code, simply because I can. Only for large dataset optimizations I turn to the database.
Of course its still a choice. But since O/RM and/or Linq-to-SQL, I don't see any business logic anymore in my database. Now even if inline queries were slower (which they aren't) I'd sacrafice that to having all business logic in code.
But how about eager / lazy loading in Linq to SQL? Does no one feel the pain I feel there? Or other issues?
And from the above results, 100% of the developers use LINQ and most LINQ to SQL. How come I don't see this reflect in the real world? Anyone has any reason not to use LINQ and .NET 3.5?
This example was very helpful. Here is my VB.NET version:
' Imports System.Data.OleDb
Dim filename As String = "C:\myfile.xls"
Dim connectionString As String = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=Excel 8.0;", filename)
Dim dataAdapter As OleDbDataAdapter = New OleDbDataAdapter("SELECT * FROM [Sheet1$]", connectionString)
Dim myDataSet As DataSet = New DataSet()
dataAdapter.Fill(myDataSet, "ExcelInfo")
Dim dataTable As DataTable = myDataSet.Tables("ExcelInfo")
Dim query = From r In dataTable.AsEnumerable() _
Select New With _
{ _
.RelationNr = r.Field(Of Double)("RelationNumber"), _
.ClientName = r.Field(Of String)("ClientName") _
For Each item In query
Console.WriteLine(item.ClientName)
Next
Thanks Andy, that's awesome!
In the example you reference the class 'Hello' twice. Both in code (Type type = typeof(Hello)) and in the app.config (<service name="Classa.Wcf.Samples.Hello">).
I was wondering, if that is necessary? Why does it have to be in the code, if it is in the config file and vice versa?
And another issue: What is the behaviour if you change it to some other contract implementation in the app.config file?
Jakob Bjerre Jensen
Hi Jakob,
The typeof(Hello) is because you have to tell the servicehost that you're hosting a service and that this class holds your implementation. The ServiceHost also needs some configurtion though. You _can_ do this all in code, but config is preferred, because you can change it later. It can find the config for that implementation by going to name="Classa.Wcf.Samples.Hello".
It needs to be the fully qualified name (Classa.Wcf.Samples.Hello) in the config. It also needs the fully qualified name in the code (the typeof(Hello)) but it can infer the fully qualified name itself.
So it needs to be in both so the ServiceHost can find the corresponding configuration. You can actually start multiple ServiceHost objects all with their own service implementation and all with their own configuration.
If you change the contract in the configuration, it will fail to start the service.
Don't hesitate to ask more questions!
And take a look for the ServiceHost without configuration in my post "WCF simple example": bloggingabout.net/.../wcf-simple-example.aspx
Regards,
Dennis
I have my WCF service hosting in Windows Service as well but I have the problem If I install the WCF service in diferent server where the client is (Sharepoint 2007) this stop to work and I get the error :"The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9843750'.=>The write operation failed, see inner exception."
I am not sure is timeout because I incresea to 10 hrs and still I get the same error.
The other problem that I have is with the auto-disconnect feature in WCF. If the user has the ASPX form Open for more than the time define the WCF server stop to work and I have to reset the IIS.
Do you have some idea??
HANK
I've got to build a workflow and I'm just off the sharepoint training. The sharepoint training only covers sequential workflows yet I read that state machine are by far the most useful. I've been searching on the web and the biggest problem I have with all of the examples is the step by step instructions seem to mainly consist of renaming components (something that gets very confusing as the names aren't very generic or easy to remember) and they spend little time explaining why you're doing that step (as it may not be relevant to my workflow). I've got several books too and they're not helpful either. At this rate I'm going to end up using a sequential workflow because the help out there is much better and they are simpler to understand. We need to find someone who can convert all of the state machine workflow jargon into english and explain it to those of us that are new to this.
No! The release time was still pretty decent: 11 PM PDT (8 AM CET)! I managed to grab the RTW download here in the Netherlands around 9 AM CET. It actually is the same build as the RC0 developer runtime ;)
Okay, I admit, I was kinda lying, I was looking at the Scott Guthrie post. He wrote it at 3 AM :)
Yeah, ScottGu often blogs in the middle of the night...
Well, if he blogged this in Asia, it's not that bad!
thank you, very helpful article !
Suresh .... where's the Choclate?
It's an interesting article Dennis.
Without sounding like a complete retard (I have my moments!), what files do we need to put where to set up updates?
Thanks in advance for your help!
Muttly
I have used different named database, of the same database having equal db structure worked fine.Hope this helps. You need not have to create a new database!
Como está siendo el PDC 2008 de Microsoft , lógicamente multitud de novedades al respecto. Versiones
Another rollup post from trusted folks... Update 10/29 A whole boatload more links!! Keynote/Windows
One other element you aren't factoring into your test is the client (meaning web server) processing hit to handle business logic that might be done faster in a stored proc. I see that missed a lot in test. I also see a lot of speed test run with really simple data manipulations, I wish I could see more complex test posted. Plus for some operations if you are doing things in code you will have to make multiple trips to the db, which could degrade performance signifigantly.
I know some execution plans might be faster if generated on the fly rather then cached depending upon various parameters. For complex operations I would bet cached execution plans would almost always be faster, but I guess I could be wrong.
Anyway, if your apps do what they should do and the users of your apps are happy with them (and it sounds like they are), you are doing a great job and no one has the real right to question your design choices, so I will shut up. Success is my measurement of what works best and what doesn't.
I have a MSMQ and service, but the problem is the service is not picking up the message from MSMQ, i tried different security settings in config file but not able to figure it out..What should i be doing in this situation?
Hey dude! Give my regards to Marco!
Enjoy the PDC!
The simple solution for me was to take offline and delete the files. Thanks for the tip.
Pingback from Articles on Oslo « MyNotePad
Looks nice, but what does the calling code in C# look like?
Does the WService publish a wsdl that can be used to create C# proxy classes from? How does this work for simplifying/automating calling code?
@Vijay : That's the good part, there is no C# code generated. It's immediately handled by the runtime
I don't know about the WSDL, if it does that right now. But eventually it should be possible.
As for calling code, that hasn't changed.
Remember that this is extremely pre-alpha bits. I don't know if you can even play around with MService yet.
HTTP could not register URL http://+:8080/ because TCP port 8080 is being used by another application.
I am getting this exception for each and every WCF example that I try to run.
I am a student and rwally need somebodys help.
Please tell me how to go about it in detail since I am a student I really understand only if told me in detail please.
Мантра TDD - Red-Green-Refactoring. Всегда начинаем с красного!
@Pooja : That's the problem with students, if you don't tell them in detail, they won't know. That's not what we need at companies! Nah, just kidding! ;)
Anyway, only one application can host something at a specific port. So if some other tool is using 8080, use a different port. You can also use 81, or 8081 or any number. I also like port 1337 :)
It's also possible that Vista doesn't allow you to open the port and that VS2008 (or .NET actually) reports a strange message. Are you running Vista? And if so, are you running VS2008 in Administrator mode?
@shool : I really have no idea with the info you're giving, although it could be security indeed. Have you tried setting everything open? All rights to "Everyone", running as administrator, run everything locally?
"@abraham: I'll try and post something soon about that."
Just a reminder if you can make the time.
I admit once I got your example working I was able to implement a nice prototype that involves queuing messages on MSMQ and processing them asynchronously.
I still have run into trouble deploying to IIS however :(
Thanks for getting us all started.
@abraham: You're right, and promised is promised. I'll set a reminder in Outlook
I am preparing a post about doing builds with FinalBuilder, explaining also the entire process that needs to be done if you'd do this by hand.
Hold on for it, I'll finish it any time soon.
One thing I'm struggling to understand is what you do if MusicItem is to contain behavior, how do you factor that in?
One thing I'm struggling to understand is how you'd build a full application with this. I've asked it to people from the Oslo team (can't remember the name) but everyone evades the answer. As if they did not think of this. Weird.
In the MService post however (bloggingabout.net/.../m-and-mservice.aspx) you can see how behavior is inserted into the model. My responding question would be, how to insert this using Quadrant... Probably some custom views with the appropriate properties.
It's only a few weeks after PDC, I've thought some stuff over and have many, many, MANY more questions than initially at the PDC.
Microsoft "Oslo" Resources " Oslo" Developer Center Download the "Oslo" SDK Ask a Question About "Oslo
I have vs 2005 and I am updating to vs 2008 so how to update my defalt proerties.
@Tapan : You don't really have to... The new automatic properties are translated by the compiler into normal properties, as you wrote them in VS2005.
You'll still write properties the old way when you want to add behavior to them. But if you just have a getter and setter which get and set the _whatever value (the backing-field) you can use the new automatic properties.
In other words, don't change anything, it'll all keep working. Just use the new properties from now on in new code.
Excellent example for demonstrating the basics of WCF. Just what I needed - thanks!
Great article, thanks for taking your time an putting it together.
Hi, normally in the step "in your project you can add the app.config, right-click it and select 'Edit WCF Configuration...'" in some visual studio installations are mising the "Edit WCF Configuration.." so to activate this option go to the Visual Studio Menu->tools->WCF Service Configuration... open this option and closed, and there is the option active in the app.config file! i hope help us!
True, my colleague Alex Thissen blogged about it here
www.alexthissen.nl/.../workaround-for-missing-quot-edit-wcf-configuration-quot-menu-option.aspx
I am using visual studio 08
I created the host and tried to test it using IE7 but it returns an error.
any solution......
darge : You seriously can't expect me to help you with so little information.
Nice Article..Thanks Dennis van der Stelt
hi m using this code and i m getting Invalid Application PAth error.i m passing it following value;
app.Path = "c:\inetpub\wwwroot\mydomain\www";
could u please help me out and also tell me the important list of properties to set or list of all website properties.Thanx
Hello,
Jeff's code it's not working when the autogeneratecolumns = true because the Collumns.Count it's always 0.
Pingback from Dennis van der Stelt on "Oslo" « .Net Braindrops
It is not easy to keep pace with Microsoft projects and products naming. There are literally dozens of
I i'm from italy.
real intresting this discution on gridview.rowupdating.
i have a strange problem. i'm not use sqldatasource,
just write by myself update method.
i use template field and with findcontrol i get the right value BUT (and made me crazy) the rowupdating event FIRE two TIME!!!!! so second time all object is NOTHING and i have server/error.
anyone can explain me WHY this event fire two times?
You might run into a problem that the assembly was signed by a different key than the manifest. You'll get this error:
"Reference in the manifest does not match the identity of the downloaded assembly xxx.exe"
The answer can be found here : geekswithblogs.net/.../117449.aspx
Go to project properties, see the section "Resources" in the application properties and in the icon manifest options, set it to "Create application without a manifest".
We also use FinalBuilder for building Inbox2, but we simply call visual studio from the command-line to build & deploy the clickonce application.
See: msdn.microsoft.com/.../ms165431(VS.80).aspx
Your tutorial does offer a lot more flexibility though :-)
Thanks a lot, works great
If you want to automate the deployment of ClickOnce apps in FinalBuilder, Dennis van der Stelt has posted an excellent tutorial on bloggingabout.net. Check it out and if you have any questions, conta ...
Its interesting that the REST example uses the language "service" and "operation".
@Colin : Because? Check out the following link btw for more MService code. bloggingabout.net/.../m-and-mservice.aspx
Yeah, running into the "Tag Cloud" problem when spaces are in the tag name on my site.
I made the change you recommended here, and I had seen repeated somewhere else, but that didn't fix it, so I assume that the applicationhost.config file needs changing... but since I'm running at GoDaddy.com, I'm sure they'll say "No." :-<
Any ideas of how this might be fixed outside of that? Since I'm running the "Express" edition, I don't have sources to modify.
-Robert
We are using Nettiers for last 2 years. Now moving to SubSonic...
That's probably because GoDaddy turned off the feature that you can change IIS settings from the web.config.
So there's probably no way to fix this, unless you'd contact GoDaddy yourself
Thanks Dennis,
This is a very cute and rich example to start with. Expect more examples to lead us to grow better on different scenarios.
Really appreciate for what you deliver.
Sunil Kurian
use the following reference if ServiceMetadataBehavior is not worcking in vs 2008
using System.ServiceModel.Description;
Thanks !
This help to understand
I struggled with this for a while before finally figuring out what was going on. The CheckForUpdate() and CheckForDetailedUpdate() methods persist the results of the update check to disk. The next time the application runs, the ClickOnce mechanism sees that an update is available and prompts the user with the unwanted window. Apparantly the update is a two step process. Step 1 - Check the deployment location for updates and persist the information about what it finds to the local ClickOnce update cache. Step 2 - Check the local ClickOnce update cache and prompt the user with the update window if there an update is indicated. Unchecking "The application should check for updates" option seems to only cause ClickOnce to skip step 1. Step 2 still occurs. The CheckForUpdate() and CheckForDetailedUpdate() methods have the same effect as step 1 - the data is persisted to disk, so the next time the application is run, Step 2 sees the update and displays the update window. The trick is prevent CheckForUpdate() and CheckForDetailedUpdate() from persisting this information to disk. This can be done by useing the parametered overload (CheckForDetailedUpdate(persistUpdateCheckResult)) and set the parameter to false (CheckForUpdate(false) or CheckForDetailedUpdate(false)). The MSDN documentation for the persistUpdateCheckResult is weak at best and doesn't explain this at all.
All the steps till 8 were successful however I dont find localhost.map and localhost.cs file under Service Reference. app.config is available though. I am stuck with the button event coz of that.
I am using VS 2008. I could see those files in your downloaded code after successfully opening in VS 2008.
Please help.
@Vaishnavi : Were you able to create the "Service Reference" in VS2008 in your client project? ie Client Project being the project that would call the service?
Cooollllllllllllllll
You can also use the Linq to Excel open source project (code.google.com/.../linqtoexcel) to easily get data from Excel. It takes care of the OleDB connection for you and you can use the where clause. All you have to do is create a class with properties corresponding to the excel column names. Here's an example:
IExcelRepository<Client> repo = new ExcelRepository<Client>(@"C:\myfile.xls");
var largeClients = from c in repo.Worksheet
where c.Employees > 200
select c;
foreach (Client client in largeClients)
Console.WriteLine(client.ClientName);
@Paul : That's a cool project! Thanks for the info!
Can you tell me. Why my service is going in faulted state? I have implemented IErrorHandler to handle the service and restart the service when reciveretry count exhaust(and when service goes in faulted state). can you suggest me why when my service is goes in faulted state even after restarting the service service is not picking the next message.
Please reply me.
I referenced your arrticle in a submission to CodeProject.
www.codeproject.com/.../WCF_MSMQ_Integration.aspx
Hope that's ok.
@abraham : no problem, of course!!!
I just love ZoomIt!!!
Hey how can i host service and client on different machines please provide me a url if u already hav a sample on it
@arun: Just run the service on another machine and change the url in your web.config on your client... If that's what you mean?
Thanks dude... It works for me.
I implemented a solution similar to yours but I've run into an issue. Everything works OK except when OnStop is called, the _host variable is always null. It seems the class derived from ServiceBase doesn't maintain state. I don't know if the service is being shut down and cleaned up properly.
The only thing I can think off immediately, is that you're using the "using" keyword. As in:
using (ServiceHost host... )
At the closing } the .Dispose() method is called and your ServiceHost is closed. Loose the using statement.
Saw your tweet about *Chirp a couple of days ago, and installed it right away. Unfortionatily, its not working at my machine.. :( And it keeps awfully quit (although I saw @chirpapp gave some sign of live just now). Well, I guess I have to be patient. :)
"Too bad the computer hasn't got Windows Vista"
I never thought I would hear you say that, Dennis.
A lot can change in a few weeks, David! ;-)
What a great example for a beginer.
Thanks alot for this article.
how to store values in view state which are selected from dropdownlist
#4 should be first, and it should be described as, IF your shop doesn't have a DBA, then continue. otherwise, setup a meeting.
It probably wasn't you ;) I've seen multiple reports of severe problems.
The outage was noted here:
social.msdn.microsoft.com/.../17af5119-ef33-4a78-a83d-d7d827ff75d8
@Erwyn : It would be a great opportunity and a first time for me to bring down 100s of machines at once ;)
Confieso que soy un adicto a los blogs y a las distintas variantes que existen de los mismos. De entre
Great post Dennis.
Did you know that you don't have to call the extension type, but can call the extension method directly on the extended type.
// Arrange
var dummy = new SomeType();
Isolate.WhenCalled(() => dummy.SendTo("")).WillReturn(SendResult.Sent);
Thanks Eli for the remark, added the info to the post.
Also added a solution to download and see what's actually happening.
Which is the best binding to use for heavy automatically reading messages from queues msmqIntegrationBinding or NetMsmqBinding?
Should your sample work in the same way if we change the binding from the config file?
@sam, msmqIntegrationBinding is for communication with MSMQ and clients that don't use WCF. For example when a client that was build 3 years ago, who puts messages into MSQM, you want to retrieve those messages with WCF, because WCF is just plain cool! ;) That's where you'd use msmqIntegrationBinding.
For everything else, use netMsmqBinding. I have no idea of the other one could possibly be faster, but I doubt it. The idea is that there are messages in MSMQ and both WCF or you would have to deserialize the messages.
netMsmqBinding is extremely easy to setup, I'd always prefer that binding.
been looking at your example. when I run the client with no host, no messages are added to the queue.
Im running on Windows XP. Everyone and my account have full control on the queue. running everything locally.
Any thoughts?
@Peter : Does this mean that running _with_ host are processed? My first thought is that you're not running via MSMQ but still directly. That'd mean the client would not be able to connect and would crash.
If you're running via MSMQ, the messages should most definitely show up in the queue, especially with the host turned off. When the host is on, it might process messages faster than you can see them coming in :)
I am a DBA + .Net developer. I got certified in SQL 2005 and .Net 1.1. I can tell you that the stored procedure offers much more functions than LINQ
1. Use of Lock Hint. A common example will be inserting an unique email into the login table. Most people do the following:
IF NOT EXISTS(SELECT * FROM Login WHERE EMAIL = @email)
INSERT INTO LOGIN(email) SELECT @email
the correct way to do is
BEGIN TRAN
SELECT * FROM Login WITH (UPDLOCK) WHERE EMAIL = @email
IF @@ROWCOUNT=0
COMMIT
The reason is to stop duplicate email to put into Login table. There are many other scenarios where LOCK hint is the ONLY solution.
2. Prevent of deadlock in stored procedure. Writing deadlock free query requires the queries to be runnning in "specific order"
3. Use of recursive SQL with CTE
4. Use of SQL 2008 new data type
5. You can assign a query plan to a specific query or specify query hint. It can solve the Parameter sniffing issue
6 You want to do a SELECT sql using ORDER BY COLLATE <collation> the column by different collation in sql. This important especially working with 2 different db with 2 different collation. Especially in different language, the sorting order is different
I'm a VB.NET programmer and have managed to convert your example, albeit the following line.
localhost.HelloServiceClient proxy = new Client.localhost.HelloServiceClient();
Vb does'nt recognise 'Client.localhost.HelloServiceClient()
Can you help?
Foei Dennis. Het prefixen van member fields is al sinds de introductie van C# afgeschaft. Kijk maar naar de Microsoft Design Guidelines.
@Dennis : Dit artikel komt uit 2004!!! Hoewel ik het er nog steeds mee eens ben en gewoon blijf volhouden! :)
Sinds C# 2.0 heeft Microsoft die _ weggelaten, want daarvoor deden ze het juist wel.
Wouldn't it be a good idea to also export your settings so that you can import them when you repave? That's what I usually do.
@Tomas : Or that! :)
But I keep forgetting stuff like that. Lost my entire RSS Feeds database. It's not that bad to loose every post, but the feeds themselves. I collect a LOT of them over time and filter out the good posts.
I've found myself in similar situation sometimes with VS. I've also written a blog post about my settings. I hope you visit and enjoy the read.
www.pchenry.com/.../Default.aspx
@Barney : Maybe remove Client or Client.localhost altogether. If it does recognize localhost.HelloServiceClient then you're okay, because you need exactly the same on the other end :)
Hi dennis...I'v successfully done a simple wcf application using your code. I needed to use a wcf service using java client though..Can you help me in this by providing the client code of your apllication in java????
@Sally : Java? What's that? :) But seriously, I could not tell you how to do that as I have no idea. But if you lookup how to connect to ASP.NET Webservices from Java or how to do SOAP 1.1 or SOAP 1.2 style services, than you should be okay.
Some examples:
www.codeproject.com/.../WSfromJava.aspx
stackoverflow.com/.../301120
forums.sun.com/thread.jspa
and from MSDN
msdn.microsoft.com/.../ms953968.aspx
As far as I know, you do need some extra framework though. It's not by default in java.
thanks a lot neways...i'l check out d refernces
"I got this from somewhere on the web, but forgot where. If I find out, I’ll of course post it here."
I guess it was me, since I referred to you then ;)
thomasfreudenberg.com/.../Auto_2D00_attaching-to-aspnet_5F00_wp.exe.aspx
@Thomas : lol, and from you to Roy Osherove, to Kevin... I'll provide links to everyone! :)
Thanks Dennis - did you mangage to get this example to work across two different machines?
So far i've been unable
@Barney : Sorry mate, but your last comment can't be approved by the system. Maybe it's because it suspects HTML in the comment. I'll have to look into it.
But... Is your service actually running? If the service isn't running (ie. the host project should be started and doing it's work) than no one will ever be able to find the service.
About the last comment, yes I have! :)
First try to get it working with basicHttp and if that's working, try other bindings. A lot of bindings can give problems with security. For example netTcp is secure by default, but if you don't know that and/or the service is in another domain or in a workgroup, you can run into all kinds of problems.
If you want to use authentication, try to use Windows authentication as it's the easiest. Almost everything else needs X509 certificates.
I suddenly remember that Azure can supply you with analytics on how your services and storage is doing
I suddenly remember that Azure can supply you with analytics on how your services and storage is doing,
I have had a Windows Azure app running in both staging and production since november 2008, so I crossed the 2000 VM hours limit a long time ago. Doesn't seem to have had any effect ;)
Look @ EnvDTE80.Transport to specify the
Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger
Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default")
Dim dbgeng(2) As EnvDTE80.Engine
dbgeng(0) = trans.Engines.Item("Managed")
dbgeng(1) = trans.Engines.Item("Native")
Dim proc2 As EnvDTE80.Process2 = dbg2.GetProcesses(trans, "DELL-09").Item("WebDev.WebServer.EXE")
proc2.Attach2(dbgeng)
.NET NP .NET Profiler – a tool is designed to assist in troubleshooting issues such as slow performance
.NETNP.NETProfiler–atoolisdesignedtoassistintroubleshootingissuessuchasslowperf...
Thanks for the kind words!
@Peter : If you want to view a list of messages going through the queue, you might want to enable the "Journal" property.
@Dennis : I am looking at developing a WCF based snmp agent which runs as a windows service. The snmp manager was built using Java and targeted for the Solaris 10 platform. Any suggestions on the architecture of the application?
@laxman : an SNMP agent in WCF? I had to look up what SNMP actually is! :)
But this means tweaking WCF from top to bottom and that's a LOT of work. I've done some tweaking, but never add protocols, encoders, etc. like you seem to need.
I also don't think from the requirements you specify I can give suggestions for an architecture. Is it for all clients connecting to the WCF SNMP agent, etc, etc. A lot of questions. What WCF concern, just start writing the binding, encoder, etc. And if I were you, I'd look into WAS (Windows Process Activation Services) that's hosted in IIS. Much more capabilities than Windows Services.
Your simple example was very helpfull. Thanks for making my day.
Didier M
you have got to be kidding me on Refactor Pro not invading your Visual Studio! Didn't you notice the big arrows, strikethroughs and animations ALL over the place? :P
Thank you for submitting this cool story - Trackback from DotNetShoutout
Thanks providing the great review.
Not all application requests are created equal
Installed all Net.3.5 SP1 VC 8, wcf framework,
Still getting
------ Build started: Project: wcf_node, Configuration: Debug Any CPU ------
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL\System.Core.dll" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL\System.Data.dll" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL\System.dll" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL\System.ServiceModel.dll" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL\System.Xml.dll" /reference:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\wcf_node.exe /target:exe Program.cs Properties\AssemblyInfo.cs
D:\_FL\wcf_node\wcf_node\Program.cs(11,6): error CS0246: The type or namespace name 'OperationContract' could not be found (are you missing a using directive or an assembly reference?)
D:\_FL\wcf_node\wcf_node\Program.cs(11,6): error CS0246: The type or namespace name 'OperationContractAttribute' could not be found (are you missing a using directive or an assembly reference?)
D:\_FL\wcf_node\wcf_node\Program.cs(8,2): error CS0246: The type or namespace name 'ServiceContract' could not be found (are you missing a using directive or an assembly reference?)
D:\_FL\wcf_node\wcf_node\Program.cs(8,2): error CS0246: The type or namespace name 'ServiceContractAttribute' could not be found (are you missing a using directive or an assembly reference?)
@Marius : Did you use "Using System.ServiceModel" at the top of your code as I point out in bullet 4?
When your cursor is on the OperationContract or ServiceContract attribute, a small red line should appear, if you didn't include the "Using System.ServiceModel". The text should also be black if you didn't. You can then press CTRL+. (So press CTRL and the . at the same time) and it should popup a small menu that allows you to add the using statement.
If you _did_ use the using statement, both attributes should display in a bluish or greenish color, just like the code snippet 5 displays.
@Alex : Every plugin into Visual Studio "invades" Visual Studio. But it's obvious when Refactor! Pro does some work.
The other tools I mentioned show all kinds of icons and Resharper even shows a lot of replacments for popup/context menus. I can't even show what the original version looked like. That's what I ment by invading.
With Refactor! Pro, if I don't want my "viewers" to know I've installed it, they probably won't notice.
I have been using presenter view for some time in XP. I now have ppt 2007 - There is one task I [And I'm sure many others] would like to be able to do with ppt 2007 - ADD NARRATION using presenter notes.....As soon as you go into add narration you end up with a full screen - so notes not visible - go to presenter view - you have the presenter notes on prime monitor - but you cannot click 'Add Narration' Am I missing something here?
Thanks for the mention.
Note that we have released a new version of Isolator
www.typemock.com/Downloads.php
Thanks Dennis, this is exactly what I was looking for!
Hi Guys,
If you guys are looking for a more up-to-date tool that you can use to do Functional and Performance testing on WCF Services, check this out.
blog : geekswithblogs.net/.../130664.aspx
direct download : www.fileden.com/.../WcfStorm-Setup.zip
Thanks - got it working over different servers - forgot to amend the app.config to new server name.
Brilliant example by the way
Thanks.....its really useful for the beginners..
You can find some good explanations here:
codeidol.com/.../Callback-Operations
In the book Programming WCF Services written by Juval Lowy, there is some code, that can let you set the port to any free port.
It can be done by attributes, but the simple thing is do it programmaticly with a helperClass.
public static class WsDualProxyHelper
public static void SetClientBaseAddress<T>(DuplexClientBase<T> proxy,int port) where T : class
if(proxy.State == CommunicationState.Opened)
throw new InvalidOperationException("Proxy is already opened");
WSDualHttpBinding binding = proxy.Endpoint.Binding as WSDualHttpBinding;
Debug.Assert(binding != null);
binding.ClientBaseAddress = new Uri("http://localhost:" + port +"/");
public static void SetClientBaseAddress<T>(DuplexClientBase<T> proxy) where T : class
lock(typeof(WsDualProxyHelper))
int portNumber = FindPort();
SetClientBaseAddress(proxy,portNumber);
proxy.Open();
internal static int FindPort()
IPEndPoint endPoint = new IPEndPoint(IPAddress.Any,0);
using(Socket socket = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp))
socket.Bind(endPoint);
IPEndPoint local = (IPEndPoint)socket.LocalEndPoint;
return local.Port;
After declaring the proxy, just assign clientBaseAddress like this:
WsDualProxyHelper.SetClientBaseAddress(proxy); or WsDualProxyHelper.SetClientBaseAddress(proxy, 3000);
I just wanted to thank you a lot for this article.
It really helps !
Hello Dennis,
Your sample is excellent and I'm wondering if it's possible to use it in Silverlight application? I've tried that, but there's HelloWorldAsync method that accepts string argument, but returns void. Do you happen to know how to overcome this?
Thank you in advance.
Goran
Hi Goran,
Yes I do. In Silverlight they don't allow you to wait for the result, because that would mean the screen would lock up. Therefor everything is asynchronous.
There should be an event, called HelloWorldCompleted. You recognize it in the intellisense list by the lightning icon. Select it, type += behind it and press [TAB] a few times.
A new method should be created in which you can handle the return value.
It should look something like:
public void MyButtonClick()
HelloServiceClient svc = new HelloServiceClient();
svc.HelloWorldCompleted += new EventHandler<HelloWorldCompletedEventArgs>(svc_HelloWorldCompleted);
svc.HelloWorld("dennis");
public void svc_HelloWorldCompleted(object sender, HelloWorldCompletedEventArgs e)
string result = e.Result;
But that's from the top of my head, so I could be wrong somewhere.
If it doesn't work, let me know.
While using the presenter view, can you be away from your laptop and use some type of remote presenter click device? I can't seem to get mine to move the slides up and down, although it will darken and reverse the screen.
Thanks for your help
Hello Dennis Van der Stelt,
I have a question to ask you? I have a program, window application, And I want my program can communication together in different computers. I can use tcp/udp, socket in .net 2.0. However, I would like to use new technique WCF. So, Can you tell me more about WCF in this situation? I hope to hear from you.
@kakalot : That's a really, really long story... But basically...
If they're in the same domain, use nettcp and windows authentication because it's fast and easy.
If Windows Authantication isn't available, but you do need security, go for X509
If you can't use TCP/IP for some reason (firewalls, nat, etc) you might want to try out .NET Services with its service bus. BizTalk Services is 't predecessor and probably still running.
Most of the time, port 80 is open and you'll be able to use wsHttpBinding.
But that's not all... Do you need duplex? Do you need peer-2-peer? It depends on a lot of stuff waht's the best binding and such for you.
@Garrett : Probably the monitor with the presenter view has focus or something. Perhaps you should click on the audience screen and set it's focus so the remote presenter will work.
If not, you can use shortcuts like left + right or pgup & pgdn or something. But that's not what you're looking for :)
But why use presenter mode when you're not behind the keyboard?
The WCFStorm site is up : http://www.wcfstorm.com. You can download the tool there.
Why use presenter mode when you're not behind the keyboard?
It's nice to be able to walk away from the podium from time to time.
thanks for the tips.
Garrett
Dear Dennis Van der Stelt,
Thank you very much for your sharing. If you have free time, I hope you tell more detail about: When we should use nettcp, when we should use WCF and what are different between them. I think It is the interesting topic which a lot of people would like to discuss.
If I understand right, we dont make any changes in machine.config at all. All the changes are made in what we copy and paste to web.config...
This post really answers a lot of my problems. Thanks a lot.
I have net 1.0, 1.5, 2.0, 3.0, and 3.5 on my computer using up a heck of a lot of disk space. I was able to remove 1.0 and 1.5, but 2.0 refuses to be removed because it will affect other applications. If this is so, then what does 3.0 and 3.5 do? I just want some of my disk real estate back!
Hubert
right click on local subscriptions and click on subscripton properties in the right pane click on publication databases and unmark all the databases that are being used
Why would you want to install 1.0 and 1.1? It's probably only a couple of MB's, where as Windows takes up thousands of MB's
And you need 2.0, 3.0 and 3.5 because they're linked. 3.5 can't work without 2.0 and 3.0. Long story, but read the following posts
www.danielmoth.com/.../net-framework-35.html
www.danielmoth.com/.../top-10-things-to-know-about-visual.html
Bang on the spot Dennis. The overtime thing can be limited by learning to say "no" but admittedly, this is sometimes very hard. In all my experience I met only a few (as in two or three) really good project leaders. They tend to take a facilitating role. One literally said "my role is to guard the planning, make progress reports, pick up the phone, receive beatings from the customer, and generally making sure that things stay quiet in this office so YOU technicians can do the actual WORK". ;-)
Windows Communication Foundation (WCF) provides a powerful programming model to develop service-oriented
Nice session. I would use a different source control structure and branching strategy, but our requirements are different (and the team is a lot larger).
As Dennis Doomen , I was quite happy with how the session went. Some stuff went by pretty fast, mainly
Its Good ..But I have a Question .. There is no Performance Loss of Visual Stdio 2008/2005? or not ..
FinalBuilder is an external tool
Typemock Isolator kind-of as well
Refactor! Pro could give performance loss, but I never notice the difference on any machine.
Unfortunatly, it didn't work a day later.
So I still have the problem. Only on my machine, no other machine has it. Sigh
Its very good example.
I've been researching a similar problem that affects only certain machines. From what I've seen, the error itself is pretty generic, but is often happens when working with something external to the CLR (in my case, print drivers, in a lot of other people's cases, databases).
Try setting the build configuration of the project to x86. This worked for both Bjorn and Pazcal on their x64 machines using a combination of WPF and Linq2Sql.
Good luck!
Dries
Why did I not think of that? Or... maybe I did but it didn't work. I'll have a look, thanks for the tip!
Thanks ofr the article. I had a question regarding the best practice in my scenario. We have a WCF service that needs to expose basicHttp and Tcp binding. Would it be best to have both bindings exposed by hosting in a Windows Service Or should we host the basic http binding in IIS and only the NetTCPBinding as Windows Service?
Hi Casino Gabling Forum,
First, I have removed the link to your website. Second, if you really want an answer to that question, please repost it, without a link to some stupid gambling site and with a normal name.
Thanks! :)
@Dries : That indeed works! Unfortunatly, not everything can be set to x86, for example my Azure / Cloud projects.
Azure is NOT ready. One of the fundamental building blocks of any application is Data. Azure recognizes this and storage services will support Tables / Queues / Blogs.
At this point in the game (6/30/2009), the REST API is finalized. If you hit up MSDN.com and go digging, there is NO managed API!!!! Yes, you can write your own C# code and wrap their REST xml based implementation and start building proof of concept applications. (Optionaly you can use the StorageClient sample in the SDK, but Microsoft has already said do not rely on this for production via social.microsoft.com forums).
I always looked at cloud computing this way:
Big Business: The costs of cloud computing is too much. We do too much business, process too many transactions, eat too much bandwidth, store too many GB's. We eat the cost, buy our servers, run our application on a 10-year plan and all is well in the world.
Medium Business: Gray area. If I am building something from the ground up, and I am out of staff/server resrouces, this might be a good idea.
Small Business: Ok, the same guy that installs Windows on the desktops also manages the network and maintains all the production apps my preferred vendor build for me in c#. New project coming, yes, let's build it for the cloud.... Except I have a 6-month ramp up period on the technology just so I can get data in/out of tables.
Summary: Wait till version 2.0 when we have nice Managed libraries that handle splitting our blob into 16 MB blocks for us.
Hello Microsoft,
Could you bring back query analyzer to the public. I really like this feature of sql server.
Lewis.
You can also type:
use master
exec sp_removedbreplication YourDatabaseName
go
@Garrett
Most remote controller send pgup/pgdn to advance/return slides. PP presenter view expect space/back space or cursor left/cursor right to advance/return slides. pgup/pgdn in PP presenter view is to scroll up/down the presenter notes *aagrrrrrrr*
I tried to change the shortcuts in PP presenter view without success. -> If anybody knows how to do, please post it here.
Cheers Rainer
Thank you for submitting this cool story - Trackback from NewsPeeps
Just noticed it too. Thanks for sharing! =)
How do you go about logging with Enterprise Library with the following line Logger.Write("Hello
Daily tech links for .net and related technologies - July 22-24, 2009 Web Development Simplify calling
Thanks, I'll read this before implementing on my next project!
Wow, my first post on SharePoint, although I've been busy with SharePoint pretty long now... More posts coming hopefully! :)
9efish.感谢你的文章 - Trackback from 9eFish
Hi Dennis!
We're hosting a WCF service, with NetMsmqBinding (3.0) inside a windows service. When a poisonMessageException occurs, we want to remove the poison message to an errorqueue and restart the WCF service, because it's in a faulted state. We tried two different scenarios, but we're having troubles on both of them. Maybe you can help us?
This is our solution structure (in test):
OrderValidatorHost (Windows Service Installer, Hosting WCF service)
OrderValidatorService (Contract + Implementation)
ServiceHelper (PoisonErrorHandler.cs)
Our 1st attempt:
Custom errorhandler: msdn.microsoft.com/.../ms751472.aspx
Everything in this sample works, except for this step:
static WaitCallback orderProcessingCallback = new WaitCallback(OrderProcessorService.StartThreadProc);
In the Microsoft example, everything is in one solution. Our solution is devided into seperate projects. The Host has a reference to the Service; the Service has a reference to the ServiceHelper (for errorhandler). Now we should need a reference from our ServiceHelper to our Service Host (Windows Service), this for making the WaitCallback. This is not possible because we would have then a circular dependency... Any idea to work this around?
Our 2nd attempt:
2. We add an eventhandler to our Windows Service to be triggered when the WCF host becomes faulted:
protected override void OnStart(string[] args)
host = new ServiceHost(typeof(OrderValidator));
host.Open();
((ICommunicationObject)host).Faulted += new EventHandler(OnServiceFaulted);
private void OnServiceFaulted(object sender, EventArgs e)
//The problem here is that we can't find a way to retrieve the message ID (the queue look up ID) of the poison message, to remove that message to our errorqueue
((ICommunicationObject)sender).Abort();
Any suggestion to catch de MsmqPoisonMessageException in this EventHandler?
Thanx a lot for your time!
Dit lijkt ons ook een mogelijkheid, maar we zien niet hoe het haalbaar is om de msmqpoisonmessageexception op te vangen. Is de mogelijk?
Top This Week ()()()() SharePoint's Branding Limitations, Part 1 SharePoint Magazine
Hi Dennis I like your example! thanks.
Thanks, good tutorial
why I do not see any of add attributes, I can only see attributes with 'lock' prefix?
Great info! Thank you very much!
This has been driving me crazy for hours! Thanks for pointing that out.
Thnx for uploading the video and awesome pictures!
Thanks I spent 2 hours trying to remove a database that's replication partner no longer existed for. Your soultion worked. You rock!
my friend had the same issue when he is calling the assembly Interop.Excel.dll in two different .net applications.
As long as there is only one application running on the machine, you won't get any error.
if you start the second application, still you won't get any error.
But if you open the windows form where in the form load it uses Interop.excel.dll, then it throws an exception
"Attempted to read or write protected memory.... "
HI,
nice example, could u give an example code of WCF web service returning data from SQL Server.
thanks,
The following is very well said by the Author. I totally agree with that.
"For some reason, I have the feeling communication in RUP is more through documents where as in Agile it's face to face communcation between the customer and the entire team. And I think that's an important difference"
where is the parameter "ExcelInfo" coming from?
Anyone have references for this code?
I have three wcf services hosted in window service.I need to host these three services, so i prepare one common setup of these three services by adding Primary Output.
Is there any other way i can achieve the same like comon location so that all DLL will be pick from that location ?
HI, great example
a minor typo,
replace this line:
Site site = mgr.Sites["siteName"];
with this:
Site site = mgr.Sites[siteName];
It is always funny to read somebody who is not agreeing with a definition !!!
Listen well... do you know what is a DEFINITION ?
hallo,
i am using from today VS 2008. so i want to try tu use WCF on it. but i couldn't the Service references by the Way above. does anybody have any experience about it?
Have a look at this URL: agilepractice.blogspot.com/.../querybuilddetail-updated.html
It is a MSBuild task for retrieving the drop folder for a build specified.
ich mean, i couldn't add/create the Service references by the Way above
I am creating a WSP solution file for one of my WebPart project. I want to deploy my resource files under 80/WPRESOURCES directory instead of 12 Hives and application 80/resource directory but unable to create it with manifest and ddf files.
Have you any idead about it ???
Please suggest me...
Thank you,
Saurabh Kumar Singh
Not from the top of my head, I'd have to check wspbuilder.codeplex.com myself. You'd better ask someone there.
You mean you've got this problem? What's your actual problem?
@slabo: It's just a name, could be anything, but it specifies what name the table should have in the DataSet. That's all.
Good Article
kapil
Dennis van der Stelt, Your efforts are appriciated.
I am new to WCF. based on your article, I am able to create and run WCF ..... cool
Is there a trace-listener for the console?
I'd like do a 'logger.write' to both a file and the console.
@Dries : You need a custom trace listener. Here's an example:
stackoverflow.com/.../how-to-write-just-message-to-debug-output-with-enterprise-library-logging
It really worked.. Thanks a lot
Is there a way to write on the log specifying the log category (routing) ?
Something like : logger.write('Hello World', WorldCategory)
MLebel
@Maxime : Yes there is, just like you write... You just need some additional quotes, like:
Logger.Write("Hello World", "WorldCategory");
Where I talk about configuration, under "category sources" I talk about the "General" category. This is the default. You can create more categories. Normally I use on for logging/tracing and another one for exceptions. Both write to a rolling-file but both with a different filename.
msdn.microsoft.com/.../dd203255.aspx
msdn.microsoft.com/.../dd139943.aspx
Check out msdn.microsoft.com/.../system.web.ui.webcontrols.gridview.rowupdating.aspx
It says that:
The Keys, OldValues and NewValues collections are automatically populated only when the GridView control is bound to data by using the DataSourceID property.
This was very helpful. Thank you
Thanks a lot...it was really helpful
Its really useful for beginners in WCF.
A perfect stater for a beginner like me - Thanks a lot
I found a MSDN blog entry discussing "using C# 3.0 with Visual Studio 2005" (200five not 8eight). Is this possible?
See:
social.msdn.microsoft.com/.../fd8cfaf1-05e3-4bd8-a663-65e0f4981cd3
@hfrmobile : Not that I know of. The thing is that those new features are baked into the compiler. And I've never seen how you can replace the compiler in a Visual Studio version, especially knowing that the compiler is also used in the background for intellisense and a lot of other stuff.
I found out that the class 'Microsoft.SharePoint.WebPartPages.WebPart' has a variable or property - 'ClassResourcePath' (with capital 'C') which does exactly that!
at Host.Open() i get following exception
Message="HTTP could not register URL http://+:8080/. Your process does not have access rights to this namespace (see go.microsoft.com/fwlink for details).
i visited microsoft link, but is not clear what command i have to key and if i need to open command windows from netsh tool. I'm working with win7.
can you help me?
My httpmodule used to work on iis7 but now it doesn't get hit anymore. Guess i have to keep on searching for an answer...
Thank you very much!
This example was exactly what I needed :)
Andrew
Project Managers usually should consult with the team before making their estimates, and pad the team's estimates, and then pad their own estimates before scheduling the project. Granted, some team members are not really good at estimates, and it's up to the Project Manager to do the estimates on their behalf.
As for saying no, I've published an article on <a href='www.pmhut.com/how-to-say-no& to say no</a>, but the thing is, before saying no, you have to have a certain level of confidence in what you're saying, and you need to have established yourself as reliable when it comes to estimating your time.
Steps Behind the Test in the VS 2008?
How to test a module in the VS 2008 Environment?
I am recently stuck with a problem on SM Workflows. I am not able to create multiple parallel task using replicator in State Machine. There can be arbitraty in number which might be based on some Business logic. Any ideas would be helpful
hi i think these posts also will be useful for you in wcf :
ledomoon.blogspot.com/.../getting-started-wcf-1.html
ledomoon.blogspot.com/.../getting-started-wcf-2-wcf-terms.html
ledomoon.blogspot.com/.../getting-started-wcf-3creating-your.html
Always got problems with the colors, I just stopped using code ;-) [That’s true almost a year ago I posted some code samples… ]
But, although you us a nice code coloring plugin, my feedreader [FeedDemon ] doesn’t use it, still plain text.
Thank for the tip on CopySourceAsHtml -- that's exactly what I was looking for!
Yeah, the formatting in Google reader is fine but it loses the color coding. Not sure what plugin he uses but Rick Strahl (west-wind.com/.../38838.aspx) seems to have that problem sorted.
Actually, Visual Studio places code into clipboard in RTF format too, not just plain text, and it always has styling info. I've made a Live Writer plugin which parses such RTF content and outputs nice clean HTML that fits my needs. Anyone would love to see code snippets formatted as in Visual Studio in their blogs, right?
Source code is not yet published but I'll do it soon.
@Clemens & @CodeKiwi : It's because in the HTML there's no markup. If you want to see color coding, visit the blog, not the reader! :)
Maybe I should use a signature, that if you want to see color, come to the site ;)
HEllo Creator,
This is Pankaj here..Can you gave me any sample of any WCF service by which i can insert/retrive/delete data from my SQL database. WCF is a new concept for me so plz help..
Pankaj
Did you try changing IIS7 from "Classic" mode to "Integrated Pipeline" mode under Extensions? That did the trick for me as I was getting 404 errors on my extensionless URLs.
WCF links
Exactly what I needed to get started with EL. Great job! Missed this in the EL documentation! This should have been the first subject in the documentation! Gets you going in 5 minutes!
Thanks Dennis fot the quick soluton
Thank you! I had to reinstall my Zune software and for the life of me couldn't figure out how to get it back to that setting.
Does anybody knows, a tutorial that for FinalBuilder that will automated my built, to change just the version number. For example, I know that my built for my software version 6.0 is working, so I just want to take that built, and just change the version number to 6.1, without going to VS and built the code again.
Thank you
sincerely
Diego
@Diego : You do have to rebuild you code, but isn't that part of your build already? It should be! First increase the build number in AssemblyInfo.cs, then build the code.
What about:
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharp3CodeProvider, CSharp3CodeDomProvider" />
</compilers>
</system.codedom>
(not tried this ...)
This tutorial is great, but I have a particular concern, After I publish my solution from .net, this include create a PA ClickOnce Deployment utility, setup files ready for the client. What can I do with FinalBuilder to take the xtm file, where the version number is, and change the version number, then remove the deploy extension, sign the manifest, and add the deploy extension back. We can do it manually, but we want automatize that process any ideas??
Therefore the basic question is: How to Change App Version Without Rebuilding?
I get this error message
Following errors were detected during this operation.
* [11/23/2009 6:05:12 PM] System.Deployment.Application.DeploymentException (ManifestSemanticValidation)
- The customHostSpecified attribute is not supported for Windows Forms applications.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at
@Rajesh : That's not the entire msg. Contact me via this page (bloggingabout.net/.../contact.aspx) and we can discuss this offline.
Imade my one from cardboard and it will never die so GLaDos in ur face
Good Post.Its really interesting.
Veel plezier bij het nieuwe werk.
Het was prettig om je als trainer mee te hebben gemaakt :)
@Mischa : Thanks! :) We moeten nog steeds een keer een broodje Döner Kebab halen met Ian!
Thanks so much!
This sample as a start point!
Thanks for the article.
I have a question - I am trying to use BasicHTTPBinding for a windows service - it will be called by a PowerBuilder 8 app, and it only understands BasicHTTPBinding.
I tried hosting the service, but when I start it, I get the error:
Error Starting, error: Could not find a base address that matches scheme http for the endpoint with binding MetadataExchangeHttpBinding. Registered base address schemes are [].12/9/2009 10:10:50 AM
I do have the basicHTTPBinding and mexHTTPBinding in the config file.
Any suggestions? Is it even possible to expose a basicHTTPBinding for a windows service?
Thanks in advance~
Hi Rose,
Yes, basicHttp is possible in a Windows Service.
The problem you have is that the MEX endpoint can't find an address to host itself on. You need to specify the address at the MEX endpoint itself.
If your service is at
http://localhost/myservice/
It's normal to put it at
http://localhost/myservice/mex/
My article about WCF addresses also shows the common way to specify a base address:
bloggingabout.net/.../WCF-Part-6-_3A00_-Address.aspx
Excellant tutorial. Can you pls give a tutorial for Database trace listener.
Hmm. When I tried it, the file was deployed to a folder named 'resources' in the site, instead of 'wpresources'. It wasn't a typo. Any ideas?
In the beginning of this article you mentioned something like "your students". I am curious, if you offer any online courses which i am very much willing to register for.
Please advice me.
But Thanks a lot for this article.
Sorry, no online training...
You can ask me questions via the contact page any time you'd like, or check out www.pluralsight.com for online training. Those are quite good.
@Joe - thank you for explaining that persistUpdateCheckResult parameter. You are right that the MSDN documentation is weak at best. Fortunately a Google search led me to your comment and that makes a lot more sense now!
then what i do it is not complete
We have a WCF service that needs to expose basicHttp and Tcp binding. Would it be best to have both bindings exposed by hosting in a Windows Service Or should we host the basic http binding in IIS and only the NetTCPBinding as Windows Service?
@Kiran : If you have Win2008 I'd suggest hosting them both in IIS.
Else my answer is : it depends! :)
IIS is much more trustworthy for your services. If the outside world connects to HTTP and internally to TCPIP I'd probably suggest your solution. When internally the service goes down, you'll know immediately and can probably do something about it because you're at work.
Of course it depends on probably more things, but I guess your suggestion will work out. I don't see any problems in having multiple hosts, but only the deployment that will become more cumbersome.
this is completely brief and useful article ...
thanks a million
To create state machine workflows for SharePoint you should check Datapolis Workbox - it's a graphical workflow designer based on Silverlight.
I am not able to find the log file. No errors. But log file is missing!!
Same here. No log file!
Some possibilities:
1) Permissions
You don't have permission to write on disk?!
Also check under which user the process is running. For example if it's a website that's logging, it's probably "Network Service" and if it's a Windows Service it's possibly "Local System"
2) Configuration
Something with configuration is wrong. EntLib is throwing exceptions. It wants to log these, but no listener is configured.
Under "Logging Application Block", under "Special Sources", under "Logging Errors & Warnings" make sure there's a trace listener that can ALWAYS write. If EntLib throws exceptions, it uses that trace listener to notify you about it.
Very Good! It solves my problem
Please tell me how to create client in VS 2005
@bas : Maybe this article will help : bloggingabout.net/.../WCF-Part-4-_3A00_-Make-your-service-visible-through-metadata.aspx
It says something about "svcutil" and how to run it. I'm not sure if, after install of .NET 3.0 SDK, the "Add Service Reference" is available in VS2005. If not, use svcutil.exe, that's what VS2008 uses itself.
i am having a problem while running this application,as u are saying right click on host->debug->new instance then click on client -> service refrence ,its not allowing to add service reference ,its showing in disabled form.without doing debug-> new instance ,if I do the same ,then its showing error occured,as its not taking http://local host/8080/ ,saying no service is there.please look into the issue and let me know if you can fix it.
@dinesh : Check out this article : bloggingabout.net/.../quot-add-service-reference-quot-is-disabled.aspx
Thanks for your help, appreciate it. On to the next problem :-)
[ServiceContract]
public interface IHello
[OperationContract]
string HelloWorld();
string HelloComputer();
public class Hello : IHello
string IHello.HelloWorld()
return "Hello world";
string IHello.HelloComputer()
return "Hello computer";
Today our team leader asked me to get someone in our team started on a new solution. This entails 2 things
I'm encountering a strange error with clickonce smart updated. I've used the code and when i publish for the first time, its fine. But, when i publish for second time, and try to run the application, from the Start Menu shortcuts, now the application should update itself, but is not doing so and simply the older version is getting again.
@krishna : Have you read this article?
bloggingabout.net/.../manual-check-for-updates-with-clickonce.aspx
It describes how you can check for updates yourself, also because ClickOnce doesn't always report there's an update. Quite weird, but the solution provided in the link ALWAYS works.
MS is Fing idiots for getting rid of this tool. They should have their heads clunked together. Put it back now!
That was helpful.
I have found a VERY similar situation wherein the Update and Delete methods of the SQLDataSource are never invoked by the GridView when the GridView is created dynamically. Subsequently, the RowUpdated or RowDeleted events should of course be called, but as you noted, no events after the action event occur (presumably because the action event didn't happen.
This page gives an excellent rundown of the flow of this operation and how it is supposed to work:
www.4guysfromrolla.com/.../printPage.aspx
Unfortunately, it seems it doesn't quite work that way with dynamically generated GridViews.
Hopefully this will get you one step closer to the answer. If you come up with it, please post it. This has been eating my lunch for a week.
I have a WCF service which I have hosted using a windows service and this windows service is created Local System log on account. I have created a private queue created for the WCF service and this queue has all the permissions required for the windows service account to access the queue. The service has been installed successfully, but when I try to run the web application which actually calls the WCF service, the following error is thrown. It works very well in the debugging environment though. Only when I run the web application by publishing it this error occurs. Also, I am trying to access the queue from the same machine.
System.ServiceModel.CommunicationException: An error occurred while sending to the queue: No internal Message Queuing certificate exists for the user. (-1072824273, 0xc00e002f).Ensure that MSMQ is installed and running. If you are sending to a local queue, ensure the queue exists with the required access mode and authorization.
How do I further ensure that the queue is installed and running and get rid of this error. Windows service is successfully running on the machine. Could you please let me know where am I missing?
Thanx
-Sowmya
Sowmya, perhaps you should contact me privatly... Just use this page : bloggingabout.net/.../contact.aspx
I have sent you the issue that I am facing in WCF service using the page that you have directed me to. Could you suggest any possible solution to that issue?
thanks for a thorough and excellent explanation. It was exactly what I hoped Google would help me with :)
Thanks very much !!
Thanks a lot
Thanks for your help.
Its really helpful to me...Please spread out this information...lot of people asking the same question in the internet.
I’ve written some tutorials in the past to help people with manually updating their ClickOnce deployed
Thank you, for writing such a simple example.
It was of great help in understanding the basic concept of WCF.
You can't possibly have installed the Windows Azure platform AppFabric because it only runs in the cloud ;) But you might have installed the SDK though.
The client components are not supported on .NET 4 yet, that's why the SDK doesn't change the .NET 4 machine.config. So the easiest option is to use multi-targeting in VS 2010 and target .NET Framework 3.5. But if you add the config manually to .NET 4 it will probably work fine.
@Erwyn : You're right, I've changed the article! Thanks :)
I have .net 1.1 classlibrary. I want it to use WCF hosted as a windows service. How can I do that? Is it possible?
@Mukund : No, that's not possible, because .NET 1.x and .NET 2.0 don't mix together.
If you can recompile it to .NET 2.0 you probably can, although I'm not really sure what you mean with a simple class library. If it's just some code that you want to run once in a while, you don't need WCF. WCF is for communication between systems or applications.
Please write step by step about this beacuse this is the burning topic for us.
Nice. It works
Thanx....
exec sp_removedbreplication works..
I'm trying to put some common images/css into sharepoint , any idea where these should go?
uggg..SQL code in a .NET program? So everything I want to change the logic in the SQL, I need to redeploy the app, meaning that I need to schedule downtime? uggggg. Maybe LINQ can be useful in small projects, but then maybe its just best to use Access.
Just re-installed my operating system, visual studio and everything. All of the sudden it keeps giving "Attempting to read or write protected memory in a .net application". Looks like I have to grant some special rights to specific users? could any one please help?
@Bob : You're Bob and you're a DBA'r? That's too good to be true! ;-)
But anyway, I've never seen a system that could change logic inside an application by changing its T-SQL (either SProc, Views or whatever). If your application does, it's a bad practice and I can guarantee that it's WAY less maintainable than my applications are.
Can you give me any sample of any WCF service by which i can insert/retrieve/delete data from my SQL database. WCF is a new concept for me so plz help..
@Sam: From which context? An application that wants to retrieve and write data? A public service that anyone can call? Pure ADO.NET? Linq to SQL? Entity Framework?
Give me some context and maybe I can work with it. There are dozens of possibilities.
Can we set default value(s) for testing the parametrized function.
for example:
<TestMethod()>_
Public Sub GetStoresTest()
Dim target As FCFProvider = New FCFProvider
Dim intUserID As Integer = 67097
Dim expected As DataTable = Nothing
Dim actual As DataTable
actual = target.GetStores(intUserID)
Assert.AreEqual(expected, actual)
End Sub
How do I keep my mouse arrow showing on the screen when I use zoomit?
Autor : Noravia Rodriguez
Date : 03/02/2010
Updates: 03/16/2010
Purpose: How to unmark a database marked as replicated in SQL Server 2005
How to unmark a database marked as replicated in SQL Server 2005
1. Try:
EXEC sp_removeddbreplication “”DatabaseName”
GO
2. Try:
Take Database OffLine
Deatch
Attach Database Back
3. This tasks need to be done MANUALLY and in the following order:
i. Drop all existing subscriptions
ii. Drop all existing pubications
iii. Create a new publications with the same name
iv. Drop it again and say “Yes” to delete information on the Distributor (Distribution Database)
v. Verify Database has been unmark for replication
1. Go to the Database-Tasks-Detach and ensure that mark has been removed
OR
2. Run the following query and ensure “Category”=0 (RECOMMENDED)
SELECT name,category,* FROM master..sysdatabases
I got the same problem. My problem was that I compiled the dll with a different version of third party component like Infragistics 9.1 instead of Infragistics 9.2. When I referenced the actual component and compiled then it's working fine.
SQL Server 2000
a. Database
exec sp_replicationdboption @dbname = N'dbPOMS', @optname = N'publish', @value = N'false'
b. Columns
use [dbPOMS]
sp_configure 'allow updates', 1
reconfigure with override
-- For Tables
UPDATE syscolumns SET colstat = colstat & ~4096 WHERE colstat & 4096 <>0
-- For columns
UPDATE sysobjects SET repinfo=0 where repinfo=1
Go
sp_configure 'allow updates', 0
The session was informative and useful. I got to know how exactly we consume and build WCF services
-Kedar
Time to upgrade from that calculator to a PC
As per author in Interfaces
We prefer however, to have an interface for our contract and have our actual service implement the interface. That's because
* Interfaces can extend/inherit other interfaces
This is wrong. Interfaces can not inherit other interfaces. Correct me if my assumption is wrong.
@Parag : They can, they can even inherit multiple interfaces.
public interface ISubInterface : IProduct, IRepository, IWhatever, ISomeThingElse
And from there you can create a single class that must implement all those interfaces.
I have a 3.5 WCF service that I', hosting with Windows Service. I have security wshttpBinding mode = "none" for a prototype we're doing. Works wonderfully locally on my box. When I deploy to a remote server on different domain I am having issues. They have the domain nat'd to an internal IP. THey have also setup the domain on an IIS site pointing to a random location on the box. Is this the way to accomplish getting to the service in a real world scenario?
Basically what I'm getting at is how do you tell the outside world I'm hosting this service through this domain besides just the config for the service? What else has to be touched on the box? IIS?
@Santiago : Sorry for the late reply. This is exactly why the Windows Azure AppFabric ServiceBus was build. It's hard to forward calls from an outside IP (172.138.12.14 or something) to an inside IP (like 192.168.0.12). You could have a look at routing or something.
But why not deploy the service on the box that's directly connected to the internet?
Hi Dear,
Your code is very easy to understand and this make me possible to implement WCF and MSMQ in my application. Now i have good idea how it's going to work.
Rajesh Gour
Thank you very much! Worked perfectly.
Good 1............
Applied to your last example, where i need to put these code????
@Felipe : Anywhere you want! You can do it
- when the application starts up in Program.cs
- when the application was launched in your form_loaded or something
- when the application was launched in your form_loaded, executing it via a backgroundworker
- behind a button that says "Check for updates"
Doesn't really matter.
Check the other links in the top of this article to find more info! :)
What you said works, but i have another issue. After all the check, when the actual update is happening and if the update fails because of network issues, next time when you open the application, the update window is coming again.
If you're in uncomfortable position and have no cash to go out from that, you would require to receive the <a href="lowest-rate-loans.com/.../mortgage-loans">mortgage loans</a>. Because that will aid you emphatically. I take collateral loan every single year and feel myself good just because of that.
Thanks. Sorry but i'm new in C#. Thanks for all. You made a great job and a great tutorials.
Great, I was going crazy over not being able to add the service reference. Thanks for the tutorial and this addition!
This is a pretty interesting blog post. I just have one quick question, how do I specify in the publish stage in Visual Studio if a update is required?, I mean, where does the info.IsUpdateRequired variable is set? Do I have to modify the deployment manifest manually?
Greetings.
"Publish" tab in project's properties window
I have a grid bound to an object datasource.
Some of my columns are template fields.
I could not get the values from the gridview in my codebehind code but thanks to Matt it worked.
Matt's posting below (in this posting) worked for me.
Here is his post:::::::::::::::::::::::
A few questions.
1. Does the background worker check for updates with out a user physically pressing a button?
2. With this code:
ApplicationDeployment updateCheck = ApplicationDeployment.CurrentDeployment;
UpdateCheckInfo info = updateCheck.CheckForDetailedUpdate();
//
if (info.UpdateAvailable)
updateCheck.Update();
MessageBox.Show("The application has been upgraded, and will now restart.");
Application.Restart();
Can I place this on form Load?
@Rich : 1. Yes, it can 2. Yes, you can.
It's probably wiser though to put the checking in parallel process with a BackgroundWorker for example.
I did bump into one single Windows Forms application where this wasn't wise, as it took 1 minute to load a LOT of data. After the 1 minute loading, it said "Hey, update, wanna install and restart the app?" and users of the app wouldn't update because they had to wait another full minute. So checking for updates before the actual loading of the data took place was smarter! :)
Of course a complete redesign of the app was even more smarter, but there's not always time for that.
Just wanted to reply, I did some other stuff, but by following your procedure I was able to help myself implement an update checker.
I will try to figure out how to use the background checker in a future update ;).
Thank you for posting this it has helped me.
@Rich : No problem, good luck!
@Joe
Holy crap, thanks for pointing that out. This was driving me nuts.
I got the same exception but only on 64 bit platform. here is my experience... archistance.blogspot.com/.../exception-attempted-to-read-or-write.html
I guess that to get the <a href="lowest-rate-loans.com/.../a> from banks you should present a firm reason. But, once I've got a sba loan, because I was willing to buy a bike.
Do not enough money to buy some real estate? Worry not, just because it's real to get the <a href="lowest-rate-loans.com/.../credit-loans">credit loans</a> to work out such kind of problems. So get a student loan to buy everything you require.
People deserve good life time and <a href="http://lowest-rate-loans.com">loans</a> or just student loan would make it much better. Just because freedom bases on money state.
Set your life time easier get the <a href="lowest-rate-loans.com/.../a> and everything you need.
Don't you understand that this is high time to receive the <a href="lowest-rate-loans.com/.../credit-loans">credit loans</a>, which would make you dreams real.
I received 1 st <a href="http://lowest-rate-loans.com">loan</a> when I was 25 and that supported me a lot. But, I require the collateral loan also.
It also depends on managing in-house projects vs. managing external clients. In later case business is not readily available for discussion. When dealing with external clients, budgeting and scoping is way important and need to be precise and estimated well in advance. For in-house project scope and budgeting is relatively lenient (my experience).
As Dennis said,getting requirement straight is important. With Agile if Project Manager is not good negotiator then small requirement turns out to be never ending. Documentation is must (even in mail is enough) but just verbal communication leads to many bad things. Agile needs very sound (technically and functionally) developers. Every one needs to deliver from day 1. In case of lateral hire, it may not always.
I guess that to get the <a href="lowest-rate-loans.com/.../a> from banks you ought to present a firm motivation. However, one time I have got a auto loan, just because I was willing to buy a bike.
This is good that we are able to take the <a href="http://lowest-rate-loans.com">loans</a> moreover, that opens completely new possibilities.
When you are in uncomfortable position and have got no money to move out from that point, you will require to receive the <a href="lowest-rate-loans.com/.../a>. Because it will help you unquestionably. I take car loan every year and feel myself good just because of it.
Can u tell how to execute this sample.breif theory how it will work.i am new to wcf.if i will keep host as startup project i am getting some window while clicking on anything it is disappearing but when i keep Client as star up page while clicking on button getting TCP error.can give some solution to this.thax in advance...
I will recommend not to wait until you earn big sum of money to order all you need! You should get the <a href="lowest-rate-loans.com/.../a> or credit loan and feel fine
Some time before, I did need to buy a car for my organization but I didn't have enough money and couldn't buy anything. Thank God my dude suggested to take the <a href="lowest-rate-loans.com/.../credit-loans">credit loans</a> at creditors. Thus, I did so and was happy with my short term loan.
This is understandable that cash makes people free. But how to act when somebody doesn't have cash? The only one way is to receive the <a href="http://lowest-rate-loans.com">loan</a> or commercial loan.
According to my exploration, billions of persons on our planet receive the <a href="lowest-rate-loans.com/.../credit-loans">credit loans</a> at good banks. So, there is a good chance to get a student loan in all countries.
Can anybody plz help me out i am getting this error ...
The HttpsGetEnabled property of ServiceMetadataBehavior is set to true and the HttpsGetUrl property is a relative address, but there is no https base address. Either supply an https base address or set HttpsGetUrl to an absolute address.
Different people in every country take the <a href="lowest-rate-loans.com/.../business-loans">business loans</a> in different banks, just because this is simple and comfortable.
According to my monitoring, billions of persons in the world get the <a href="lowest-rate-loans.com/.../personal-loans">personal loans</a> from different creditors. Thus, there's good chances to receive a financial loan in every country.
@Surya : Sure, perhaps reading this article will help.
The <a href="lowest-rate-loans.com/.../mortgage-loans">mortgage loans</a> are useful for people, which are willing to start their own organization. As a fact, that's not very hard to get a auto loan.
In Kevin Jones’ session at today’s DDD South West on ‘Testing ASP.NET MVC Applications ’ the question
Do not enough cash to buy a house? Worry not, because that is achievable to receive the <a href="lowest-rate-loans.com/.../personal-loans">personal loans</a> to resolve all the problems. Therefore get a student loan to buy everything you need.
Hi. I create custom membership and role provider. But I don't need to insert in web.config the connection string. All data are managed by my framework class.
Ho do I config the web.config to set my custom membership and roleprovider without "connection string"?
If you are in the corner and have no cash to get out from that point, you will have to receive the <a href="lowest-rate-loans.com/.../personal-loans">personal loans</a>. Because that will help you unquestionably. I take auto loan every time I need and feel myself OK because of it.
Houses and cars are quite expensive and not everyone is able to buy it. Nevertheless, <a href="lowest-rate-loans.com/.../business-loans">business loans</a> are created to support people in such hard situations.
Do you understand that it is correct time to get the <a href="lowest-rate-loans.com/.../a>, which would help you.
hi dennis, i'm having problem after adding a Service Reference. just like some people above, after adding Service Reference, there is no localhost.map / localhost.cs files under Service References. I'm using VS 2008. Host was running fine.
"localhost" is the namespace used. When you enter HelloServiceClient, Visual Studio 2008 should be able to help you find the namespace and add the using statements at the top of your code. Be careful though to enter the HelloServiceClient case sensitive, or else VS2008/VS2010 can't help you find the namespace.
Place your cursor in the HelloServiceClient and press CTRL + . or hover your mouse over it and click the widget that opens up.
hi dennis, i was able to make it work. in my project, it created ServiceReference1 (it was the default namespace i used when adding the Servive Reference). HelloServiceClient was an object under ServiceReference1 (as what is displayed in the object browser). i just had to replace "localhost" with "ServiceReference1" and it works. thanks for the tutorial ;)
@guyjasper : Glad it worked! Congrats!
Does there exist a newer example for VS2008? I'm getting an error 415 when trying to add a server method and generate the client proxy file.
C:\Users\Krischu\Projects\WCF\WCFSimpleExample>"C:\Program Files\Microsoft
SDKs\Windows\v7.0\Bin\svcutil.exe" localhost/HelloService /out:Proxy
.cs
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152]
Copyright (c) Microsoft Corporation. All rights reserved.
Attempting to download metadata from 'localhost/HelloService' using
WS-Metadata Exchange or DISCO.
Error: Cannot obtain Metadata from localhost/HelloService
If this is a Windows (R) Communication Foundation service to which you have acce
ss, please check that you have enabled metadata publishing at the specified addr
ess. For help enabling metadata publishing, please refer to the MSDN documentat
ion at go.microsoft.com/fwlink.
WS-Metadata Exchange Error
URI: localhost/HelloService
Metadaten enthalten einen Verweis, der nicht aufgelöst werden kann: "http://
localhost:8008/HelloService".
Der Inhaltstyp "application/soap+xml; charset=utf-8" wurde von Dienst "http:
//localhost:8008/HelloService" nicht unterstützt. Möglicherweise besteht keine Ü
bereinstimmung zwischen Client- und Dienstbindung.
Der Remoteserver hat einen Fehler zurückgegeben: (415) Cannot process the me
ssage because the content type 'application/soap+xml; charset=utf-8' was not the
expected type 'text/xml; charset=utf-8'..
HTTP GET Error
Fehler beim Downloaden von 'localhost/HelloService'.
Fehler bei der Anforderung mit HTTP-Status 400: Bad Request.
If you would like more help, type "svcutil /?"
C:\Users\Krischu\Projects\WCF\WCFSimpleExample>pause
Drücken Sie eine beliebige Taste . . .
@Krischu : The log says port 8008, but isn't it 8080 in your case, just like in mine?
Hi Dennis, thanks for the quick answer. I changed all (hopefully) occurences from 8080 to 8008 (since I have running other services - tomcat - on 8080).
--
Christoph
@Krischu : Let me know if it works, or doesn't work. I'm working on an updated version of the example, including more info on how to host it inside a console app and IIS and get more bindings/protocols working.
Here again the output. Must have been some problem with cut/pasting the message: (but, as said, I changed 8080 to 8008 on purpose)
Greeat article. I'm stuck on step 9. When i create a new instance of the host, I am unable to right click on the client project and add the reference. I am using VS 2005. Any thoughts?
How can i implement this solution in a class????
@Felipe : What do you mean by that?
@Dannyboy : VS2005 was a long time ago for me, sorry. Is it the problem described here?
Else check out this article about svcutil.exe
bloggingabout.net/.../WCF-Part-4-_3A00_-Make-your-service-visible-through-metadata.aspx
nice article i am searching from a long time for like this article thank u so much
@Krischu You should probably do http:// and specify the right port number using the svcutil. So it should be something like
svcutil.exe localhost/HelloService /out:Proxy.cs
I have no idea, why the :8008 (colon - 8008) did not make it through the cut/paste mechanism into the text area in this blog. Believe me, They are all there in the original statement. So that's definitely not he issue. I'm passing the correct URL to the svcutil command line.
@Krischu: Go to the url of your service with a browser. You might've made a mistake in your service that makes the (http) MEX endpoint not available. The browser will most likely tell you what's wrong.
Dennis, you can see it from your own post: The URL is converted to a link. When you hover with the mouse you can see the complete URL in the status bar. This is due the lack of posting code (pre) sections in this blog.
Hah! I figured it out:
<pre>
svcutil http://localhost:8008/?wsdl /out:proxy.cs
</pre>
(localhost : 8008 that is in the above line, in case it gets eaten by the blog formatting again :)
@Krischu : Contact me via the contact form. We'll discuss this over email further! :)
i have tried this sample with Visual Studio 2008 but don't working. I can't do the steps from 9 in avant ... where is my mistake? Thanks in advance
@Enrico : What exactly can't you do? Did you try this:
thanks you for your help, i solve it!!! When i run the application appeare the next error: "HTTP could not register URL http://+:8080/. Another application has already registered this URL with HTTP.SYS."
I think because i have publish the Host application in localhost, so how can i un-publish? Thank again
@Enrico
There might be two problems. In more secure versions of Windows (Vista, 7) you can't just register addresses on ports, because you're not allowed. Run Visual Studio as Administrator and it works.
The other thing is that there is already running something on that port. There can't be two listeners on the same port. So either shutdown the first application, or change the port number in your wcf service.
now all working good. I have the next question: is necessary that the service is always active for consume it from client? In test enviroment if the service it's not live i cant consume it from client, there si something wrong yet or it's normal so? Thanks in advance
@Enrico: YES! :)
But you can also host in IIS and then IIS will bring the service to life when the first call takes place. IIS will also tear it down after 20 minutes of inactivity.
Caveat: When you go to VS2008 you will still see that there are different Menu items in the area of "Add Service Reference" vs. "Add Web Reference", depending on whether to set the project based on Net 2.0, 3.0 or 3.5.
For Host the service in IIS i must Publish it in IIS, after i must create the proxy client with svcutil tool?
@Enrico: Either that or with "Add Service Reference" in Visual Studio :)
It’s been a long, long time since I wrote the original WCF Simple Example post. It was even before Visual
Update : This post was updated and is much more explaining in this post, WCF Simple Example in Visual
Hey,
Thank you so much for your wonderful article.Cheers.
I have sample WCF application with interface as contract as shown in the above article but when i am trying to host the contract i am getting the following error
The contract type MyFirstConsoleApplication.Mul is not attributed with ServiceContractAttribute. In order to define a valid contract, the specified type (either contract interface or service class) must be attributed with ServiceContractAttribute.
Any help greatly appreciated.
Your sample is excellent and I'm wondering if it's possible to use it in Silverlight application? I've tried that, but there's HelloWorldAsync method that accepts string argument, but returns void. Do you happen to know how to overcome this? I wish to use http://www.evildrome.com for all my downloads.
The previous post was the most simple example of creating a WCF service and calling it from a client
Hi Sree,
Some suggestions:
1. Does your class (your implementation) implement the interface? ie. public class Mul : IMul
2. Is the word "ServiceContract" in green? I hope so, else it wouldn't compile! :) But when you hover over it, is it from System.ServiceModel or another namespace?
3. can't think of anything else this early! :)
Thank you so much. It was a great article. I learned a proper foundation to start further.
How to "EmailService project". Please explane.
@Avi: WHAT?
Thanks a lot..I searched so many examples on wcf, but this is the best and simple which i found out and i learned to create and consume webservices.
If my host and client are in two different solutions , will that make any difference?
Even if you run them both on different computers it would work. That's the entire point of WCF, connecting systems in a dstributed environment :)
This is really great stuff. Thanks for writing it up.
I'm using Visual Studio 2010, could you tell me where to inject the deployment code? I have a WPF project and would like to turn off the automatic check for updates too, or at least control its behavior more.
Nevermind, I ignore my last questions... I figured it out. Thank you for the article!
msaccess.Open();
//OleDbCommand cmd = new OleDbCommand("update Table2 set name=@mname,city=@mcity where srno=@msrno",msaccess);
OleDbCommand cmd = new OleDbCommand("update Table2 set srno=@msrno,name=@mname,city=@mcity where srno=@msrno", msaccess);
cmd.Parameters.Add(new OleDbParameter("@msrno", OleDbType.Integer));
//cmd.Parameters["@msrno"].Value = Convert.ToInt32(((TextBox)(GridView1.Rows[e.RowIndex].Cells[1].Controls[0])).Text);
cmd.Parameters["@msrno"].Value =Convert.ToInt32 ((GridView1.Rows[e.RowIndex].Cells[0].Text));
cmd.Parameters.Add(new OleDbParameter("@mname", OleDbType.VarChar));
cmd.Parameters["@mname"].Value=((TextBox)(GridView1.Rows[e.RowIndex].Cells[1].Controls[0])).Text;
cmd.Parameters.Add(new OleDbParameter("@mcity", OleDbType.VarChar));
cmd.Parameters["@mcity"].Value= ((TextBox)(GridView1.Rows[e.RowIndex].Cells[2].Controls[0])).Text;
//cmd.Connection.Open();
cmd.ExecuteNonQuery();
// cmd.Connection.Close();
msaccess.Close();
GridView1.EditIndex = -1;
bindgrid();
//GridView1.DataBind();
It is possible, for example, if I have a BackgroundWorker in different forms in my application, that change in the role of main window. My question is: Can i put the code in the DoWork and RunWorkerCompleted events in a class and just call in the events, and how i can do it?. Thanks for all.
@Felipe : Those questions aren't ClickOnce related at all. You can put anything inside classes you want and have background workers there, or have backgroundworkers in your form execute the methods in your other class. There are a million possibilities there.
How about hosting a wcf service at the same time with another service in a single windows service?<did you get i mean?> for example, i would like to host my wcf service everytime i start my MyOtherService? Can that be possible?
Excellent article, keep up the good work. I read a lot of forums on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say I’m glad I found your forum.
<a href="http://servetechnology.com" rel="dofollow">Serve Technology</a>
That's most definitely possible, you just have to take into account that QoS (Quality of Service). Your service won't restart automatically, you'll have to program that yourself. Also when there are attacks or memory leaks, your Windows Service won't help you with those. IIS will!
I can't stress enough that IIS is the best option to host your WCF Services. Especially if you have WAS (Windows Process Activation Services) there's almost no need to host your services yourself.
In case of VS2005 I cant find the Add Service Reference option? How do we add it as reference?
Its working.. Thanks alot.. for this article...
Bail me out! I suggested an architecture to my company which I will explain in a second but only examples I am seeing are doing the opposite of what I suggested. Basically we have a master queue where tasks for different systems are dumped and processed on that server. The server is not able to handle the load so I suggested we use WCF to split out the tasks to different queues on different servers. Makes sense, right? Except every client/server example I have seen have the host receive the messages from different clients instead of vice versa. You input is greatly appreciated.
Okay, so this is all well and good. I take it the examples are done using a full version of Visual Studio? What do you do if you're trying to walk through these examples and all you've got is Visual C# Express 2010?
@Michael : As far as I know, should work exactly the same. The only difference is that you don't have the team building stuff and some advanced remote debugging of assemblies in Express, plus no AddOn support. Should work exactly the same for everything else.
@Pete:
Either I am, or you are mixing things up. Or I'm just not understanding your problem! ;-)
Anyway, first you talk about a master queue where tasks are put into from different systems, and they are processed by one server. If that's not client-server, I don't know what it is.
On the other hand, you're talking about client/server and that it is not what you're using. So you might either be talking about some service bus, or publish subscribe. I highly doubt you're talking about pub/sub. That's where a system is publishing messages, without knowing who picks these up. WCF can't handle this scenario, it's probably best to look at NServiceBus for lightweight scenarios and BizTalk for expensive, hard to build en huge distributed scenarios. ;-)
The other thing is some sort of ServiceBus where you put messages onto a bus and a random system picks up these messages. It's kind of like Pub/Sub, only it's not. That scenario is more about some pipeline that messages get thrown on, and they might be modified or extended or so and might even be routed to some other system.
- WCF can do routing since version 4.
- Pub/Sub it cannot do.
- Load balancing it cannot do either, you'll have to build it yourself using WCF4 routing, or better use an existing implementation for dedicated Network Load Balancing (NLB) software/hardware.
If you want more info, you'll have to explain your situation a bit more.
You can also email me via the contact form on this blog.
Many thanks for replying. Basically I am thinking to run a service on the machine that has the master queue. That server depending on the kind of message it is will send it to a different server. The client running on that machine will save it to the local queue on that server. That way I will be able to split the tasks between different servers. If there a new task that the main service need to delegate I want to be able to add a config with the message parameters and the destination server queue and the service should be able to dynamically send those tasks there. I might have bitten off more than I can chew 'cause I am not seeing any examples that will help me do this. Thanks again for replying. Looking forward to your expert opinion.
When you are in not good state and have got no cash to get out from that, you would have to take the <a href="http://bestfinance-blog.com">loan</a>. Because it would aid you unquestionably. I take short term loan every year and feel OK just because of that.
Please help me out. Here is my question rephrased :
# I have a master queue (msmq) on Server A
# I need to configure WCF to take messages depending on what kind they are and send them to different servers to split the load.
# From the examples I am seeing this should require very little code. Problem is WCF abstract away a lot of code by providing configuration options in web/app.config. Problem is the WCF "host" that is running on Server A has to be able to send different messages to different servers (endpoints?). I am not sure if one service could have different endpoints. If this is not possible or too complicated maybe I would run multiple instances of this service each with a different endpoint all reading from the same queue.
# All the examples I am seeing are of the "host" receiving the messages from clients on different servers. Am I doing something wrong?
# I am also confused about WAS. What is it exactly? I know it is a feature in Windows Vista and all subsequent OSes. Does this mean I can't run the sample on Win XP with IIS 6?
I came across this article while browsing for ClickOnce info. I'm the author of a piece of software called ClickOnceMore (see http://www.clickoncemore.net).
The software is designed to help people automate ClickOnce builds. It provides a project editor UI for setting up the project with the files you want to install and the certificate and other options (including the password and timestamp URL). Then there's a command line version so that you can add it to a build script or such like.
It could be helpful to you in situations like you describe above.
Greg
Don't have money to buy a building? You should not worry, just because it's available to take the <a href="http://bestfinance-blog.com">loan</a> to resolve such kind of problems. Therefore get a credit loan to buy all you require.
I have some files needed for the application to run (dll-s that I cannot add as references because they are not .NET-style, other config files, etc, so they are not deployed by ClickOnce technology), so after publishing the app, I will copy by hand these files to the server, and when app starts I want to copy them dinamically from server to client local disk. (if this is the very first time the app is running on that machine and these files don’t already exist on local disk). They will not modify from one version to another, so I won’t copy them to server every time.
To copy these files from server to client, of course I have to know server (deployment) location and client location (directory where the app starts on local disk).
For server location I tried to use ApplicationDeployment.CurrentDeployment.UpdateLocation, but it gave me http://193.33.94.254/MyApp/ MyApp.application (the content of deploymentProvider tag), so not the place where I can find
For client location I tried to use ApplicationDeployment.CurrentDeployment.DataDirectory, but again this is not the directory from the local disk where the .exe locates.
So I guess for client side I could use the old System.Windows.Forms.Application.StartupPath, right?
But what can I do about server location? How to obtain http://193.33.94.254/MyApp/ Application%20Files/ MyApp_1_0_0_7/ let’s say?
Domnica
Is it possible to unit test the native c++ code in Visual studio 2008/2010 without any modification to source code files. Please clarify me and should i need to choose other external framework.
G Subramanian
mail id: subramanian.g@tsts.in
Absolutely awful, on something that should have been a happy occasion. I hope your wife will be conscious soon to see her new daughter.
Best of luck to you all.
Veel sterkte. :( Hopelijk wordt je vrouw morgen wakker en heeft het geen blijvende schade...
Dennis, I am not easily moved but right now I am trying to keep my shaking hands steady while typing this. This indeed qualifies as the worst day of any life. Words fail me. There is only hope left. I'll just keep my fingers crossed and hope for the best. All the best wishes, luck, hopehat strenght and faith to you and yours. Hang in there.
I will be praying for your wifes recovery.Be Strong.
Dennis, wat een ongelooflijk schokkende ervaring. Woorden schieten te kort. Ik wens jou en je gezin alle sterkte toe en ik hoop dat jullie er zo goed mogelijk uit komen.
After not hearing either way from you after the early morning tweets, during the day I slowly started fearing the worst (as is the expression). However I now learn that my worst was nowhere bad enough... I don't know what else to add, except wishing you and your whole family all the best and the strength to endure this ordeal. May everything turn out to be alright in the end!
Wat kan ik zeggen? Sterkte! Ik hoop zo ontzettend voor je dat het allemaal goed komt.
I just read your blog post and will be praying for you and your family. My sister (23) died suddenly in a car accident 2 weeks ago and I know prayer works. Even in our worst fears He is still faithful and will be glorified. I pray your wife makes a miraculous recovery and she and the baby are home soon.
Dennis man, wat een verschrikkelijk verhaal. Het heeft mij echt geraakt, en dat gebeurt niet zo snel. Laten we hopen dat ze morgen zonder blijvende problemen wakker wordt. Sterkte de komende tijd.
Dennis ik wens je veel sterkte en met alle andere hoop ik met je mee.
Wat een ellende man. Alle sterkte van de wereld!
My thougts are witheet you and your family. Hoping for the best!
I have the same problem with one of my clients. It works fine with all others. I used a 3rd party POP control to retrieve email, and get this error. I have searched on the net and it seems that there are too many different situations cause this error. My question is: is this a hardware memory issue? or the programming issue? If it is a code issue, why does it happen to all clients?
Heel veel sterkte Dennis
Dennis, wat moet je zeggen in deze situatie. Ik hoop met alle anderen hier dat het alles goed komt. Heel veel sterkte in deze zware periode.
Veel veel sterkte Dennis! I am speechless.
I dont know you. But that does not change anything. I understand you and hope all your family goes thru this together and safely. God bless you all.
My prayers are with you.
Verschrikkelijk! Heel veel sterkt!
Wat verschrikkelijk! En zo snel en onverwacht.. Ik hoop echt heel erg voor jou en je kinderen dat dit nog enigszins goed afloopt. Heel veel sterkte!
Words simply cannot express the empathy I'm feeling for you right now. I have never had to deal with such a situation. Hopefully I never will. In the meantime Dennis, I can only wish good things for you and your family. Try to stay positive, hard though it may be.
Dennis, wat een verschrikkelijk nieuws!
Ik wens je veel sterkte en kracht de komende tijd... hopelijk wordt je vrouw snel wakker en komt het goed.
Nogmaals heel veel sterkte!
I can't even begin to imagine what it's like for you. Sorry to hear, truly hope things improve. I know I have neglected those close to me for work, and your experience just shows how wrong that was. Metta to you, Dennis.
Hoi Dennis, Wat een nachtmerrie. Ik hoop dat er snel goed nieuws komt!
Heel veel sterkte!
Ongelooflijk.
Ik kan alleen maar mijn hoop en wensen toevoegen aan alle andere.
Wat verschikkelijk om te horen. Ik hoop dat het een klein beetje helpt dat er zo veel mensen met je mee hopen dat alles goed komt. Heel veel sterkte toegewenst.
Sterkte. Ik hoop dat alles op z'n plooien valt!
Verschrikkelijk dat jullie dit moeten doormaken. Dennis, heel veel sterkte toegewenst.
Prayers from us..
Heel veel sterkte.
I hope all goes well. Good luck and hang in there!
Damn Dennis, Ik dacht nog even de Tweets door te skimmen, kom ik jouw verhaal tegen... sprakeloos.... Heel veel sterkte toegewenst :-(
**** man..
Really sorry to hear this. :/ Just like Maarten I was skimming through my tweets when I read this.
I hope she'll make a good recovery so you both can enjoy your baby girl together..
How are your kids taking it? I guess you've had to tell them by now?
Best of luck man.. wish there was something I could do..
My prayers go out to you.
Hello Denis,
Did you answer Antonio's comment as I have the same issue and am unable to solve this. Can you help:-
**********************
Antonio said:
*****************
Regards: Patrick
Hi Dennis..
What a terrible thing to happen. I can tell you that even for an outsider this is hard to comprehend.
It's a good thing that you were able to be at the hospital so quickly. Seeing you need to arrange something so quick for your kids.
I'm hoping things are starting to turn around and your wife can recover well from this. And that Marith makes a healty start in life.
Wat een vreselijke situatie, woorden schieten te kort. Het is niet voor te stellen hoe je je nu moet voelen, met een pas geborene die de basis van meer geluk zou moeten zijn.
Ik wens je alle sterkte en wens dat je vrouw haar ogen open doet om jullie dochter te kunnen bewonderen.
Sterkte!!
Dennis, vreselijk niet te bevatten. Mijn gedachten gaan uit naar jullie.
Sterkte en veel kracht voor de komende dagen. Samen met jullie hopende dat ze hier goed uitkomt en snel aansterkt.
i think this is problem of the version missmatch in the OS.
My heart is with you and your wife and I hope for her speed recovery.
I wish there was something more I could do to help, I'll pray for her health.
Dennis, I am very sorry for you and your family. I know it must be very hard on all of you at the moment. My thoughts and prayers are with you.
Hi, I´ve stopped by your site and I am trying to use your tips. I am now stuck with two problems:
1 - I´ve disabled the autoupdate and did the check programatically.
When I install the application and there is no new version on the site, there is no warning (ok).
If there is a new one, then a dialog is shown and if if I select OK, the app updates itself.
But, if I bypass the update option and quit the app, next time I run it then the "AutoUpdate" window of ClickOnce appears, showing the "OK" and "Ignore" buttons. Why is this happening? I double checked the Publish settings... :(
2 - I have a version 1.0.0.96 in my web site, and I generate the .97 but I didn´t published it to web, only installed directly.
So, I have .97 installed in my computer and .96 in the site. But, when I start the app, it shows me that a newer version is on the site and, if I click OK to upgrade, then the .96 version replaces the .97 in my computer.
How can I stop this bizarre behavior? It is a bug? It is also happening in other application that uses the AutoUpdate from ClickOnce.
Well, besides that, very Thank You for your great site!
Best Regards,
Rudolf Gutlich.
Dennis, right after I sent you a message in another post then I stopped here, and I am very moved by your wife´s situation.
I am a brazilian man but my father was born in Rotterdam, so I have much of a dutch in my heart.
I am praying for your wife, and also for you and your children. May God bless you all!
Hope to hear soon from you, with very good news!
How is she doing now?
How do be connect to database and run SQL ?
From what I gathered from Dennis' posts on Twitter she's conscious again and making some progress, but not really aware of her condition.
Those who want to stay up-to-date might do best to follow his posts on Twitter at: http://twitter.com/dvdstelt/
Came back from a long stint away from the internet to read this. Me and my family really hope everything will turn out OK - be strong.
Dennis, man! De woorden schieten me tekort, toch heel veel sterkte. Ik hoop dat alles snel goed komt met je vrouw. Nogmaals veel sterkte toegewenst. Ik kan alleen maar bidden voor jullie.
Hou je sterk, zowel je vrouw als je kinderen hebben je nodig! Daar doe je alles voor Ok!
I wish your wife a quick recovery!
Sir,
I will pray for your wife ..
May ur wife come back soon with a smile:-) Prayers for ur family.How is she now?
How are your wife and family? We are with you and your family!
Thanks worked a treat :-)
What I can say?. I really do not know. These things happen, but what you do not understand is why do you happen to good people.
I honestly do not know you or you or your family. But really this is something you do not wish on anyone.
Personally, I appreciate your hospitality when I've done a query. I really am not Catholic, but I know it's good to never lose faith.
I sincerely hope that your wife a speedy recovery so you can return to being the family previously, and congratulations on the birth of your daughter.
Do not give up, however difficult this may seem, she needs your love.
I've only just read this and my prayers are with your family. How is your wife now?
thank you
Heel veel sterkte, ik hoop dat alles goed komt.
It’s been six weeks since my last blogpost . And although people could’ve kept up with the current situation
I'm so happy for you and your family. All the best!
Wow, this is great news Dennis! Enjoy!
Great to hear this news. I've been following your roller coaster ride for the past weeks on twitter and I'm happy for you and your family.
Geweldig nieuws Dennis! Geniet ervan, dat hebben jullie verdiend.
Super...dat zijn de betere wonderen
Gefeliciteerd met deze fantastische afloop! Probeer de rust en tijd te vinden om zowel van je nieuwe dochter als van je vrouw te genieten.
Dit is echt heel goed om te horen. En ik hoop dat het voor jou en je familie nu ook allemaal weer wat rustiger wordt. Geniet er maar van.
Fantastic - I'm so pleased that it's all turned out ok.
it meant a lot went you sent that card when my father passed away and your still there in my thoughts.
Take some time for yourself make sure you're the father you want to be for all those girls and the husband your wife woke up for.
Ian
Geweldig voor jullie allemaal. Zo te zien heb je een gezinnetje om trots op te zijn. Wees er zuinig op!
We just couldnt leave your website before saying that we really enjoyed the quality information you offer to your visitors... Will be back often to check up on new stuff you post!
Good to read everything worked out like this, I hope you now finally get to enjoy the newborn in the way it's supposed to be :)
Im glad to hear things are getting better. Strenght and health to you both in the days to come
Take good care of yourself XxX
Definitely can relate to what you went through as I myself have dealt with this situation. Unfortunately for me it didn't turn out the way my family hoped. But happy to see it does happen and people get through such difficulties.
congratulations and may this remind you how fortunate you are to have your family. :)
Your collegue,
Joseph Castaneda
TellUs Los Angeles office
I am so happy for you, your wife and the kids that miracles do exist!
Wish you all the best.
Sicco
Indeed a miracle Dennis and if anyone deserves it, it's you. Respect for the way you are always there for your family, in good times and bad.
Tom
Great series of posts thanks so much for your time in writing them and answering questions. What a good web samaritan you are! ;.)
Question please: I created a web service from a msdn article-basichttpbinding and I can only get to the /MEX endpoint. I can't browse to the svc or svc?wsdl
How do I enable this for sharepoint?
TIA.
Ray
Ah I should have posted my last question here on this updated tutorial. For a web service in sharepoint I declare the service factory and basichttpbinding in the svc file then deploy. Thus no need for settings in a config file. I can browse to the ***.svc/mex URL (enabled via attribute in service class) but not to the _vti_bin/xxx.svc file nor if I append the ?wsdl to it. I get the wsdl on the mex page. Would be nice to see details of the contract on the svc page in the browser. How could I enable this please? Thank you Dennis.
Wow thank goodness for that. Just saw your posts on this horrible life event. Wishing you all the best; my heart goes out to you and your family.
Nice Article. Simple and veryuseful
Neat Trick, thanks Dennis
Hiiiii Dennis
i am getting folling error ..please help over that
Could not connect to localhost/HelloService. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8081.
can any one correct my service problem
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings>
<add name="VotingConnectionString" connectionString="Data Source=IRAM-PC;Initial Catalog=Voting;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. -->
<compilation debug="false">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. -->
<authentication mode="Windows" />
The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> -->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS. -->
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
</assemblyBinding>
</runtime>
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="VotingPanel2.Web.Service1AspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service name="VotingPanel2.Web.Service1">
<endpoint address="localhost/Service1" behaviorConfiguration="VotingPanel2.Web.Service1AspNetAjaxBehavior"
binding="basicHttpBinding" contract="VotingPanel2.Web.Iservice1" />
</service>
</services>
</system.serviceModel>
</configuration>
my email address is emirza_pk@hotmail.com
Good article. Simple to understand
can u give example for two machine client and server connected through LAN
It is my pleasure to read your article, your article is very wonderful. Thank you for sharing!
This is a fantastic tutorial for total Noobs who are new to both .NET and WCF. Case in point: me :). Working through an example like this is the best way to conceptually understand how WCF works. So Kudos to you, Dennis for putting this together.
This is a simple and easy way to start with WCF. Thanks
It's not so simple to bring a not bad written essay, preferably if you are engaged. I give advice you to define buy essays and to be spare from disbelief that your work will be done by writing service
very nice explanation, could you please expalin wcf with a good example, which covers every thing about wcf in a single application
very helpful.. thanks
May God Bless you dennis.. Will keep you in my
prayers. Don't lose your faith.
I am pretty new to WCF. How did you access Hello class in Host class?
Type type = typeof(Hello);
I guess you have added the reference to Hello class within Host. Right?
I hope your wife is feeling better. All the best to you and yours!
@Kelsri: If the Hello class is not in the same assembly (in Visual Studio an assembly will always be a project, on your file system it's most likely a .dll or a .exe) you would surely add a reference to the assembly and a using statement to the namespace at the top of the class which initializes the ServiceHost.
But perhaps my other article makes everything much clearer:
bloggingabout.net/.../wcf-simple-example-in-visual-studio-2010.aspx
Excellent! This solved a caching issue too for me!
Awesome man, Really simple & nice blog for understanding WCF.
SNS
Good!!! Time to say SQL Server Bye... Bye....
Take MySQL, Oracle, IBMDB2.. Ect.. Now.
Eairlier I have faced this issue fixed by doing some changes that is mention here.
anjumrizwi.blogspot.com/.../64-bit-critical-error-has.html
However after 2 months I am facing same issue in same area after fixing style cop warning issue.
It is working on locahost 32 bit & win 2008 32 bit mode.
Not working on 64 bit.
My System environment:
Win Server 2008 R2
IIS 7 - 64 bit
VS 2010
.Net 3.5
Hi, i have an error in error list in EmailValidator.cs
it saying the name 'Regex' does not exist in the current context.
code as below, can you tell me what is the solution?
==
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
namespace EmailService
public class EmailValidator : IEmailValidator
public bool ValidateAddress(string emailAddress)
Console.WriteLine("Validating: {0}", emailAddress);
string pattern = @"^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$";
return Regex.IsMatch(emailAddress, pattern);
@Leung : The Regex should be in System.Text as far as I know. It's a static class in the .NET Framework. So if you can't find it, something's wrong with your setup. Might be incorrect .NET version, although very unlikely.
Anyway, just return true as it interferes with the WCF experience right now.
return true;
I also got the same error. Even though .NET 4.0 should have it by default; i.e. System.Text
You can add one more reference to resolve the issue.
using System.Text.RegularExpressions;
That'll take care of the issue.
Best possible way to get your foundation ready with WCF.
Thanks a ton dennis
I'm with Bob on this one.
Stored procs expose an interface to the application, and as long as the dba maintains that interface, you can change anything you like behind it without having to redeploy the app. That's been immensely useful in my experience.
I wrote an IDE because I wanted something like Query Analyzer, but with code completion and a few extra features. I'd love to know what you thought of it...
@Matt : Where can I find it?
Thanks! Any idea how to specify a specific user/password for the connect as property?
I have created same as you given in blog.host application executed correctly then i created Client Application same as you given.Here am getting error at local and client.am included namesapce(service refrence added in client).the following code written i client application.
string result = proxy.HelloWorld(textBox1.Text);
MessageBox.Show(result);
please help where done mistake in my application.
Thanks & Regards,
Rajendra prasad.
Rajendra,
The mistakes are most likely in the configuration. And as you don't provide the error message itself, I really don't see how I can help you.
while running am getting error as below listed:
The type or namespace name 'localhost' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'Client' could not be found (are you missing a using directive or an assembly reference?)
my configuaration file code listed below:
<?xml version="1.0" encoding="utf-8" ?>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_HelloService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="localhost/HelloService" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_HelloService" contract="ServiceReference1.HelloService"
name="BasicHttpBinding_HelloService" />
</client>
First, your configuration is wrong. It says the endpoint its address is at "localhost/HelloService" and that's not a uri. It's probably "localhost/HelloService" or "localhost/HelloService" if you've followed the tutorial correctly.
When you created the service reference, something was different than in my example or initial setup. At the bottom of the screen you specify the namespace. As shown in this screen:
bloggingabout.net/.../4784.CreateServiceReference_5F00_34697BA6.png
In that screenshot, it says "ConsoleClient" and in the tutorial above it suspects that "localhost" is there. That's your problem when it says it can't find localhost. It's not a WCF problem, it's a .NET namespace/type problem that's found at compile time.
Extremely helpful example. Thanks Dennis.
Amazing. I just spent 4 hours fighting with the Application Blocks, and you got me where I needed to be in 5 minutes.
Can I recommend doing one with the Exception Block that logs to a SQL server?
good exmaple.
steps to test the project:
==========================
1) run host project(open only host project and run)
2) then only you will be able to add "http://localhost:8080/" to the client project
3)now run client project and test it.
Note: add servicereference is nothing but addwebreference.
Sorry for the slow reply, the web page for the tool is @ www.atlantis-interactive.co.uk/.../default.aspx
Excellent tutorial! Very useful for someone (re)starting .NET, VS and WCF. Thanks.
Oh..thank you so much....
It's was a noce stub.. for WCF. Thanks..
Awesome Post sir
Thankyou Dennis!!!
Very simple and descriptive tutorial...
Make your life time more simple take the <a href="http://bestfinance-blog.com">loan</a> and all you want.
Awesome :)
Excellent tutorial for WCF beginner
woopieeeeee
People deserve very good life time and <a href="http://bestfinance-blog.com">loan</a> or secured loan would make it much better. Just because people's freedom bases on money state.
it worked with me too, many thanks
Someone referenced this post to answer question "How do i get rid of a .netframework error?"...
Was very helpful, it was a simple solution but no 1 usually tends to think on that side....
And you did so you are the 1 :)......
And about above comments removedb replication and all that it wont work if logshipping is broken and morever if ur missing the *.tuf file......
Please read the post before you all answer and make people go in wrong directions......
And also its next to impossible at times to update sys tables even with DAC connections.....
Anyways Nice post ......
I am trying to host my WCF service using Windows Service. I have created the installer for that and it is installed successfully, but whenever I am trying to run the service I am getting the following error :-
Service cannot be started. System.InvalidOperationException: Service 'WcfService1.Service1' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.
at System.ServiceModel.Description.DispatcherBuilder.EnsureThereAreNonMexEndpoints(ServiceDescription description)
at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost)
at System.ServiceModel.ServiceHostBase.InitializeRuntime()
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open()
at WindowsServiceHostApp1.Service1.OnStart(String[] args) in C:\Documents and Settings\kr-ajay\Desktop\Demo-Project\Host_WindowsServ...
For more information, see Help and Support Center at go.microsoft.com/.../events.asp.
Please help me to resolve the issue.
I was wondering how ClickOnce detects that an application update is available. Does it look only at the application's version number ? Lately, I changed my application clickonce deployment so that it is deployed in x86 mode instead of the MSIL mode. After doing this, clickonce was NOT updating my previously installed but it was installing a new copy of my application as if my application was being newly installed.
Could anyone shed some light on how and when ClickOnce determines that it should update an application ? Whether changing parameters such as the application installation URL, Processor architecture and so on, make clickonce believe troubles Clickonce and make it consider the application being deployed as a brand new application ?
Hey there,
You forgot to configure an endpoint in your App.Config or it's not correct.
You can read more about it here:
bloggingabout.net/.../WCF-Part-3-_3A00_-Hosting-the-service.aspx
Or Full examples here and here:
bloggingabout.net/.../wcf-simple-example.aspx
You probably need something like the config below. However, I don't know the exact types of your contract and it's implementation.
<service name="WcfService1.Service1" behaviorConfiguration="MyBehavior">
<endpoint
address=""
binding="basicHttpBinding"
contract="WcfService1.Service1" />
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
<serviceBehaviors>
<behavior name="MyBehavior">
<serviceMetadata httpGetEnabled="True"/>
</serviceBehaviors>
Thanks for your quick response. here is a copy of my config file, please have a look on that and suggest me what need to be fixed.
<compilation debug="true" />
<service name="WcfService1.Service1" behaviorConfiguration ="MyBehavior">
<host>
<baseAddresses>
<add baseAddress = "net.tcp://localhost:9100/Service1/" />
</baseAddresses>
</host>
<endpoint name ="NetTcpEndPoint"
address =""
binding="netTcpBinding"
contract="WcfService1.IService1">
</endpoint>
<endpoint name ="NetTcpMetadataPoint"
binding="mexTcpBinding"
contract="IMetadataExchange"/>
<behavior name ="MyBehavior">
<serviceMetadata httpGetEnabled="False"/>
<serviceDebug includeExceptionDetailInFaults="False" />
Hey dennis, i tried the above procedure. im facing a problem while im trying to add a custom cache manager, mainly while loading the assembly.. if the assembly is built wid .net 4.0 then the enterprise configuration doesn't allow loading saying that it dll is built with a newer version, than some tmp file..
And if i build the dll, wid .net 3.5 den it says that it does nt find any type which implements ICacheManager.
.NET 4.0 assemblies won't work, period! :) That's because the config tool was build in an older version of .NET.
.NET 3.5 assemblies are actually .NET 2.0 assemblies and they should work. And what it simply says it that it does not contain a class that inherits/implements the ICacheManager interface. The ICacheManager interface is inside the EntLib assemblies, dunnow exactly which one. Don't create your own ICacheManager interface, it won't work.
I found the answer to my question here:
blogs.msdn.com/.../580223.aspx
Shah MOHAMOD
@Shah : Thanks a lot for replying with the link! Probably helps others as well!
Is there any Tools/ third party tools/ utility to migrate my existing web service to WCF.
Please help me find out the migration tools.
Dennis & Ralf, thank you both for this lovely article. Please keep the articles coming that make understanding new concepts easy.
Jessi
I spent about a week looking for a very concise, simple explanation of WCF and then I found your site. Thank you very much!!!!
I propose not to hold back until you get big sum of money to order different goods! You can get the <a href="http://bestfinance-blog.com">loan</a> or just sba loan and feel yourself free
Hi dennis,
I have developed WCF service concept of publisher and subscriber, here publisher to develop in WCF service library and subscriber to develop in windows application. publisher to implemented on windows application its working fine, but when i deploy the publisher in windows service to start i got error.,
"Error opening host : HTTP could not register URL http://+:8731/WCFServerDLL/Service1/. Your process does not have access rights to this namespace (see go.microsoft.com/fwlink for details)."
The above link for microsoft to see to use httpcfg.exe and set the URL, before to run on windows application that time i implemented to set the URL.
what the reason for it doesn't work? can you give me suggestion.
Hey Siva,
You're not giving a lot of information on Windows version or so. But my guess is a question of rights. Read this blog to find more info:
blogs.msdn.com/.../addressaccessdeniedexception-cause-and-solution.aspx
If you find the solution in the blog difficult, try to start the service with administrator rights. Giving your Windows Service the local admin account or something. If that works, you know it's a rights problem.
hi dennis,
thanks for quick response, i am using windows XP.
The above blog as similar that this link "msdn.microsoft.com/.../ms733768.aspx". i had to implement that using httpcfg.exe to set the URL.
My user account also administrator rights already there.but i got same error
I give my App.config File below here to check is correct.
<appSettings>
<add key="EndpointAddress2" value="net.tcp://192.168.0.194:8002/PublishingService" />
<add key="EndpointAddress1" value="192.168.0.194/.../" />
<add key="EndpointAddress4" value="net.tcp://192.168.0.194:8004/SubscriptionServie" />
<add key="EndpointAddress3" value="192.168.0.194/.../" />
</appSettings>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<service behaviorConfiguration="WCFServerDLL.Service1Behavior"
name="WCFServerDLL.Service1">
<clear />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"
listenUriMode="Explicit">
<!--<identity>
<certificateReference storeName="My" storeLocation="LocalMachine"
x509FindType="FindBySubjectDistinguishedName" />
</identity>-->
<endpoint address="localhost/WCFServerDLL.Service1"
binding="wsDualHttpBinding" bindingConfiguration="" contract="WCFServerDLL.IService1" />
<add baseAddress="localhost/.../" />
<behavior name="WCFServerDLL.Service1Behavior">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
i am in crucial time,pls to give me a suggstion.
windows XP sp3.
Here i run the httpcfg.exe set urlacl /u localhost/.../Service1 /a
i get the result
HttpSetServiceConfiguration completed with 87.
and if someone would like to save the files? i've tryed on the link you suggested, but the is folder was somewhere else, maybe for a different version of silverlight? :/
C:\Documents and Settings\andrea\Local Settings\Application Data\Microsoft\Silverlight\is
anyway in these folder it's possible to find the full files, like videos, or only little cache files?
thanks anyway :)
Hi Dennis, good article for startup. I was wondering what MEX endpoint for, I commented the line and I can still browse from IE and call the service in the windows app. So what's it used for?
does anyone know how to use replicator in SM wf?
To "Aoe":
you can simply create your won rolling.log in the application folder and give its path in your listener.
Very nice article ...thanks a lot friend...keep it up
@vincent: The MEX endpoint is for discovery of the contracts. In other words, without it you should not be able to discover what actions (commands/methods) are available and what they require as input.
The fact that your HTTP endpoint is still visible, can have multiple reasons. For example, in .NET 4.0 the MEX endpoint is automatically added to the service, even if you don't specify it! :)
Some time ago now I wrote about doing manual ClickOnce deployment using the command line and FinalBuilder
Public Query Analyser ... can't live without it ... or at least my public can't !!
Please resolve this omission.
Thanks for the great articles Dennis!
I have one question: what would be the way to to create a function in the ConsoleHost to process the input from the Service application (instead of processing the input directly in the service application object)?
Could not connect to localhost/HelloService. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8080. help
I have done this on several websites, however its much easier to do it in IIS...
I make xml files act as ASP files so i can process code on the server-side and output xml.
@Jony : It's really hard with so little information. It's on localhost so I presume you can connect to it. Sometimes going over machine boundaries makes problems harder. But it could be all kinds of problems. Server not running, not running correctly, binding not setup, etc, etc, etc...
Im working on windows mobile application. As Im working in an organization I use a proxy server. Im using visual studio 2008. I have followed all the steps but Im unable to connect the emulator to the internet. Can you assist me in this issue.
Fantastic!
The best self-hosting WCF "getting started" tutorial I have seen!
Thanks buddy, Its Great
Since you wrote this, has anything new come up? Any libraries to simplify doing option #4?
Let me know pierre2543 at hotmail.com.
Tkx in advance.
Nice article. I am new to c# and WCF.
I am kind of lost in this step
Type serviceType = typeof(EmailValidator);
The type or namespace emailvalidator is not found are u missing a using directive or an assembly reference) ?
So I know that I need to add referemce to ConsoleHost from WCFSimpleExample2010 how can I do that?
And also I read in your replies that I can do this in 2 differnt computers lets say I created WCFSimpleexample2010 in one system and ConsoleHost in another system how can I add the reference to it?
please let me know
Sherry
I added the reference and I can add only IEmailValidator and If I add EMailValidator I am getting error message.
Thanks for really easy example.
1- I know the concept of your project is same as the WCF project but why you didn't new a WCF project and used console application?
2- Do you know how we can connect to SQL via Entity Data Model in addition to WCF service, because I want develop an application which can to get some information via WCF and then save them in SQL via Entity Data Model. If there is some useful link please send me or share it here.
azizi
bamshad.azizi@gmail.com
@Sherry : Have you got a class EmailValidator at all? Do you have casing right, because you're writing EMailValidator while it should be EmailValidator.
Put your cursor on the word EmailValidator and press and hold the CTRL key and then press the . key (while holdering CTRL). A context menu should appear, asking you to either create a class (which is wrong) or add a using statement for the EmailValidator. That should do it.
The console application is just to get WCF up and running. You can also let IIS do this for you. What you really need is the IEmailService for specifying which operations should be visible/usable on the service and of course EmailService, because an interface alone doesn't do anything.
But you need WCF being activated on both sides. I did it with a console application, and than you need a console app on both sides. One for sending a message, one for receiving a message. But you can also do this in Windows Forms, WPF or whatever. The receiving side however is, most of the time, in IIS or in a Windows service.
@azizi:
1- Because I like to be in control! :) And also because when you start completely blank, it's easier to explain what really is happening. When Visual Studio already generates tons of code and config for you, it's harder to explain what you actually need.
2- There's a ton of info out there and it depends on what you need. But WCF RIA of Data Services or whatever already helps a lot. But you can also just transfer the EF entities over the wire, because they can be serialized by WCF.
Nice. I was looking for a simple, manual way to check for updates, and lo and behold, I found a fantastic family of routines to do it and do it well.
Thanks for sharing. :)
Every body knows that today's life is not cheap, but different people require cash for different stuff and not every one earns enough money. Hence to receive fast <a href="http://bestfinance-blog.com">loan</a> or auto loan would be a right way out.
I solved this problem in the following web:
jtstroup.net/.../Attempted-to-read-or-write-protected-memory-This-is-often-an-indication-that-other-memory-is-corrupt.aspx
We have the same problem with update dialog "Update/Skip" even with the "Check for updates" option unchecked.
We put the CheckForUpdates(False) lines at the beginning of our application (huge application) but it continues sending the dialog.
To find out where is the right place to put the lines, we put a messagebox right before this lines, but when we saw that first put the update dialog and then the messagebox.
Where I have to put it on? Is there a special generated code wrapping the application, and there is the right place to put the overload?
Desperate. Jose.
I'm not really sure what you mean. But when you turn off checking for automated updates, it shouldn't check for them anymore. Period.
Of course, don't forget that it'll take an update of the client for these settings to transfer. So test it by updating at least 2 times after setting this option.
And make sure you don't have an automated build or so that simply turns it on again! :)
This worked for me like a charm.
i face a problem during the proxy creation manually and also with easy way..,pls help me....
the problem as follow -
/// error in visual studio 2010 commmand prompt
URI: http://localhost:8080/">http://localhost:8080/
Metadata contains a reference that cannot be resolved: 'http://localhost:808
0/'.
There was no endpoint listening at http://localhost:8080/">http://localhost:8080/ that could accept
the message. This is often caused by an incorrect address or SOAP action. See In
nerException, if present, for more details.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 1
27.0.0.1:8080
There was an error downloading 'http://localhost:8080/">http://localhost:8080/'.
There's a problem with the service.
Make sure you have a MEX endpoint in your config and try to access the http endpoint via a browser.
For good people,God always help.
It's a great smaple for me to start lean WCF. Thanks!
Hey thanx a lod buddy, you know i also implemented image upload through ajax using REST webservice its GREAT!!!!. I needed a mechanism to upload images ajax based on my website http://www.jalandharsearch.com and it worked like a charm.Thanks again
I tried implementing the service but I am getting the 'AddressAccessDeniedException' Http could not register the url....
I have read all the above comments and have tried to do the following:
1.Run as admin. (am using vista, VS2010)
2. tried to change the port no. from 8080 to 1337 or 8081 but still the same. I checked my port 8080 or nay of these are not used by any other application.
3. when I try to run it as admin, I am getting the following error:
VS cannot start debugging because the target c:\...Host.exe is missing. Please build and retry.
I would really appreciate if you could help. I am going crazy trying to grasp wcf since past one week, but fail. Finally reading the comments and article here, got some HOPE!
@Huzefa : Try the following article as well:
I really, really need to create a webcast of this and show how easy it _should_ be. Of course there can be all sorts of problems due to things not working because of security settings, for example.
When you say, run as admin, do you mean run under the local administrator account (!) or that you select "Run as administrator" from the context menu, when you right-click on VS2010 icon?
And can you specify what ...host.exe is completely? Is it svchost.exe or something else?
Nice article
Run as administrator as in from the context menu by right-click. By ...host.exe , I meant the path in my C:\ drive where the error message is pointing that the host.exe should be present.
Is there a way to loop through all active databases and shrink all the log files on the server? This would be great as a part of the maintenance plan.
Yes I'm agreed with you that Agile save time but the thing is that, what I have experienced in the industry that too much documentation regarding the project will be painfull the new one and too less is also having the same meaning.
If you follow Agile with too less documentation and incase anyone has left the company on urgent basis and you have to plug someone else. If you haven't sufficient documents about the project than how the new person can adjust himself or herself in the project without having documents.
Definitly the above management didn't waste their time to describe about the project and even you don't.
Nice work done, most of our customer ask for this, I will share this article in our knowledge base.
Hi Dennis! Just want to add, you shouldn't forget to update both machine.configs (32 AND 64 bits).
For me also the entire Microsoft.ServiceBus.dll was missing, probably because I had previously installed AppFabric v1.0, but replaced it by the new CTP release v2.0.
Anyway, your post was helpful to me :)
I am getting following error when I run the ConsoleHost Application.
Error :
Service 'EmailService.EmailValidator' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.
Please help me.
Amit
I need to set priority for the message. I tried with MSMQIntegrationBinding , but I can set the message priority but I am not getting the messages as per their priority level.
At the receiving queue I am creating that with priority option opened like this
MessageQueue q = new MessageQueue(<QueuePath>);
q.MessageReadPropertyFilter.Priority = true;
Even though i could not get the messages based on their priroity.
Any help.
- Kumar
I followed your tutorial, using the nservicebus NuGet package (NuGet FTW!!!) in a WCF project hosted in IIS7 but experienced a strange issue. I got the error:
:Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made to load a program with an incorrect format."
To solve this I had to set the "Enable 32-bit applications" in the advanced settings of the Application pool to True.
After that it worked like a charm! Thanks!
This is great help, Clean steps, Hoping lot more.
Thank you!
make sense, easy to understand. nice posting..
Very good tutorial, well explained, thank you.
My jaw just dropped, this is awesome !!!
Although I was trying to recreate everything (classes and apps) from article (I don't like just running solutions) and there was nowhere mentioned needed references to System.Messaging etc.
Great article, keep up good work.
ThanX Dennis,
a very good example and lotZ of help for one to dive into WCF.
i hosted my wcf service in windows service but when i call async method of wcf service am getting cross-domain error as below :
This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.
@ahobul: Did you try a default basichttp client in a console window and got that to work cross domain?
ya it is working with console application in both cases nettcp and basichttp, but it is not working with silverlight application
@Ahobul : Silverlight isn't allowed cross domain to access wcf services, meaning that you need a crossdomain.xml or clientaccesspolicy.xml file. As this most likely isn't possible via a Windows Service, you probably need to put the service on a webserver.
Read more here:
msdn.microsoft.com/.../cc197955(v=vs.95).aspx
NEED query analyzer back...lightweight and fast for quick view of data and done. I don't mind querying available from SSMS but to me the audience of each tool is much different.
Is it possible to easily change this to write to a log file instead of the event viewer?
@Alison : Yes
Just deployed my first two ClickOnce apps, before i read this post!! Now need to change them and redeploy them!! Wish i'd found this post first!! Great Post and expertly explained!!
Thanks, you help me a lot, jeje!
I was having some problems with a WCF because I didn't know how to create a public WCF, and the code in your post gave me the key.
Iam creating all 3 projects.. when iam running svcutil.exe .. it is creating file... but its not showing in console client project.. do i have to add manualay it comes automatically in the projects.. once utility is run..
Please help
hi,thanks for your illustration but i have an error which is ' Error 2 The type or namespace name 'localhost' could not be found (are you missing a using directive or an assembly reference?) E:\Documents and Settings\Eslam Farag\My Documents\Visual Studio 2008\Projects\WebSite\Client_Consume\Code.cs 23 15 Client_Consume
'
so,could you mind helping me,Thanks for your kind wishes.
I have a doubt regarding this. I have hosted a WCF service project in Windows service.Also I have another project file which is also using WCF services. I want to refer this Hosted WCF service in a WCF service. So how can i do that? Can you please tell the steps to do that?
In short "Consuming Windows Service hosted WCF service from another WCF project file"
If you are willing to buy a car, you will have to get the <a href="http://bestfinance-blog.com">loan</a>. Furthermore, my brother usually takes a bank loan, which seems to be really fast.
Do not want to be accused in plagiarism? Want to submit cearly unique papers? Choose plagiarism check and be assured that your stuff are unique.
ok tanx for informing me.thank you
Thank you for an advice. I've just started to use VS2010 so I still do not know tricks liks these ones.
For others stuck like I was, This post states
"If the publisher is on ServerA, we should set UnicastBusConfig’s Endpoint to ServerA@PublisherQueue. "
That is in fact backwards.
You should set the Endpoint to PublisherQueue@ServerA
hope that helps
Tal
Great Job man!!
Thanks for the information. I had a problem with my unchecking of the "check for updates" box not being retained, enven though I did set an update location, as suggested. I found that I had to execute the publish process via the Publish Now button, using the wizard either from the publish page or from the menu caused the box to be automaticlly rechecked.
I'm wondering if you have any comments, suggestions, or opinions about how to use ClickOnce in an IE9 environment? I found the SmartFilter indication that a clickonce setup.exe is not typically run as very strong and would probably motivate a user not to try the program.
Art
http://www.drybridge.com
@Art : The .application file/link is the one you want. It should run with no problems from any IE version. Firefox needs a small update.
I had a dream to make my own company, however I did not earn enough amount of cash to do that. Thank God my friend suggested to take the <a href="http://bestfinance-blog.com">loan</a>. So I took the car loan and realized my dream.
It's not easy to exist in this truculent environment. However, the papers service is a flash light in the end of tube.
Thanks Tal, I changed the post to match your comment. Sorry for confusion! :)
Thank you, it's very awesome description it might be very obliging for students. For example last year when I had a difficult of time at the end of semester with a everlasting flow of academic assignments and mission, I had a awesome idea to buy it somewhere and than use plagiarism checker. I was so bushed that I did not care for what can happen when my academic work was written by other side person. To my admirable surprise, research paper was honest the price I paid for it. I was so charmed with the quality and now everytime i use this service.
I had got a dream to begin my own business, nevertheless I did not earn enough amount of money to do that. Thank heaven my colleague told to use the loan. Therefore I took the secured loan and realized my desire.
Your website has to be optimized very well if you strive to have improved traffic. Maybe you require SEO service and cheap seo services. You are in a correct site. We will aid you professionally!
Research papers creating is not a thing to worry about at present time, because help writing paper company can be able to resolve any academic papers writing assignment.
Good job and good article
Many Thanks for your help,
Actually I didn't find an error, but where do I start? what is the starting box? :)
Good question! :) It's the top-left one, but a nice start action would've been better :)
I have a problem! after following your steps the generated app.config file for service does not contain (service behaviorConfiguration="HelloServiceBehavior" )
and i add it by hand to app.config, where is my mistake?
Very Nice Tutorial.
Thank you for sharing!
Greetz Peter
Nice Article.Easy to understand.
It woked just perfect!!!!
I propose not to wait until you get big sum of money to buy goods! You should get the <a href="http://bestfinance-blog.com">loan</a> or just sba loan and feel fine
Remember to user checkForDetailedUpdate(false), or the nasty Win3.1 style dialog box will keep on showing...
Here is a great article to help you when you are starting a WCF project: msdn.microsoft.com/.../hh27311
@Charlie D : Page not found?! :)
If you want to buy real estate, you will have to get the <a href="http://bestfinance-blog.com">loan</a>. Moreover, my sister always uses a term loan, which seems to be the most fast.
This works great, but I have one question:
Currently, the host takes the message out of the queue before the service's method has finished running. Is there a way to make it so that the message queue transaction only completes after the service's method has completed successfully?
Thank you so much for the tutorial, helped me a ton!
-Joe
I'm not sure if I understand you correctly. You mean that the service takes out the message, the transaction fails, the message should still be in the queue, but it's gone already???
That's understandable that money makes people free. But what to do when somebody doesn't have money? The one way only is to try to get the <a href="http://bestfinance-blog.com">loan</a> and car loan.
I am facing the same problem when i try to save and excel book using .saveas method. I googled for last four days but no suggestion is resulting to be useful.
If i save a workbook using .save method then it gets saved properly. Please i would be very thankful if anybody can help me.
Thanks in advance
This is well known that cash can make us disembarrass. But what to do if someone has no money? The one way is to get the <a href="http://bestfinance-blog.com">loan</a> and term loan.
Came across this fine example. Had a play and works well. Possibly MS needs to develop a higher level using drag-and-drop tools onto a form. The more I get into this (and always had a fascination with distributed computing), the more balls I seem to have in the air. It's certainly different from standalone Win Services, remoting, channels, etc. Question though: How is this placed with respect to Service Broking and MS SQL Server? Can I contract directly into MS Server avoiding some of the trappings of ADO.Net, possibly using Linq?
However, great work. Love the clarity of writing and explanation. Thx Dennis.
I did exactly what is written above. (until "Accessing the metadata" part ) when I type to the browser http://localhost:8080/ page didnt show up. What is the problem and how can I fix this?
@Tugce: So many possibilites, that I can't think of anything specific when you provide me so little information. Sorry! :(
@Quen: Don't know if I have every answer and if you're looking for the answers I give you.
- Service Broker is a queueing technology that is WAY harder to get into than WCF with MSMQ or nServiceBus or so. I'd ditch Service Broker if I were you.
- SQL Server has nothing to do with WCF. SQL is a data store, WCF is a communication mechanism.
- If you want to access data, this has also nothing to do with WCF. I'd use Entity Framework if you're going for Microsoft, or nHibernate if you up for it. Both technologies need a lot of investment to gain knowledge.
About the channels etc, that's what WCF uses. Not sure what you mean. If you mean .NET Remoting, it's dead. You can use TCP/IP with WCF as well.
Windows Services are a way of hosting your application. They can host WCF services as well. But if you have IIS7 and WAS (Windows Process Activation Services) it's probably VERY unwise to host them yourself in Win Services.
Did you experiment with datetime.kind ?
See : bloggingabout.net/.../something-you-really-should-know-about-dates-beeing-kind-to-datetime-kind.aspx
What happens if kind is not equal for the dates.....
Say startdate = 01-01-2000 kind = unspecified and
enddate = 02-01-2001 UTC -11 kind = specified....
I am also getting the same error while saving the excel file using saveas method. Can anyone please help me rectify this problem ? I am using VS 2008 (C#)
Interesting, I was not aware of the READPAST hint but I also cant think of a scenario where I would want to use it.
Why not make use of inheritence?
I usually just inherit the class do that is has access to protected stuff. This new class is then an internal subclass in my unittest.
You are using interface so your imlementation methods should be marked virtual which they currently are not. :)
2nd, why not just create a mock? Then you also can validate that the repository save is actually called.
lol, are you going to comment everything!? ;)
I'm making a series of posts with examples like these.
About the virtual methods, you're right. I forgot.
And about the mock, I'm doing state-based testing here. I know that when writing mocks like these yourself, you can also mark a boolean that some method has been accessed. A mocking framework is even better yet, but I'm trying to keep things as easy as possible. But I'll add an example with a mocking framework in it as well. The original idea though, started with someone asking me about how to have mocks and inject those with Unity. So I thought, let's write some posts on it.
That is good that we can receive the <a href="http://bestfinance-blog.com">loan</a> moreover, that opens new opportunities.
Some time before, I did need to buy a building for my business but I didn't have enough money and could not order anything. Thank goodness my comrade proposed to get the <a href="http://bestfinance-blog.com">loan</a> from reliable bank. So, I did so and used to be happy with my bank loan.
Discount discount = new Discount(5, new DateTime(2001, 9, 11), new DateTime(2011, 9, 11, 16,0,0));
@MarkO : What about it??? I don't get your point?
I would really like to understand this but it suffers from a very common disease - it assumes the reader can read minds and is really out of touch in understanding what a beginner needs explaining. - I am fine with the instructions to open new project and solution from the WCF templates (except that VS2010 offers no option for 'class library' as stated inn the text - only 'wcf service library' is an option - so I choose that - the next statement in the tutorial is 'now create a contract' - be useful to explain how, why or what. I managed to guess I had to right click in solution explorer and add something new. When I did I couldn't find anything called a "contract" in the list of templates only WCF service class or -(eureka) 'interface' (not what was written in your tutorial)
so I got there - I am using VS2010 v10 sp1 - is it that this tutorial is based on something planetarilly different? or is the writing a rushed job skipping the boring steps -
Sorry to complain -you've got lots of warm fuzzies from others which I am sure you richly deserve if only for taking the effort to publish this but if you see yourself as a teacher and you are pitching this at noobies then perhaps the getting started phase deserves more attention.
surely it is not the most difficult thing in the world to document exactly what steps take you to what point?
Hey John, the writing is most certainly not a rushed job. But if you're not sure about "Class Library" and all, perhaps it's not wise to start with WCF. It's pretty complex. This and my other tutorial on WCF, are some of the most easy and complete you can find. If not, let me know which one you found more comfortable.
When I have time, I'll have a look at it again.
I just stepped over your new WCF articel and as far i can see now its great! This will safe me some time!
Thx alot!
@John: Meybe Dennis' way to explain the contract is not straght forwared. I was irritated too, but if you read just a few line more you'll find the ServiceContract which was meant.
Hehehehe, I changed it a bit. Hope it's more clear now.
@Sherry
If you can't see the EmailValidator class, it's because you forgot to put "public" in front of the class definition.
Just add it, and you'll be all set.
in vb.net, i used this code to connect to the device, i got an error:
zkFinger.Connect_Net("192.168.0.201", 4370)
'Error msg:
connect rfid reader Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Thanks a lot. Nice.
Please use this script to remove table value from sys.tables:
-- Removes Replication Flag for all Tables in the Database
-- using sp_MSunmarkreplinfo
SET NOCOUNT ON
DECLARE @tablename NVARCHAR(128)
DECLARE @RC INT
DECLARE curTable CURSOR FOR
SELECT [name] AS tbl
FROM sys.tables
OPEN curTable
FETCH NEXT FROM curTable
INTO @tablename
WHILE @@FETCH_STATUS = 0
BEGIN
EXECUTE @RC = dbo.sp_MSunmarkreplinfo @tablename
END
CLOSE curTable
DEALLOCATE curTable
Please bring back query analyzer to the public. I really like this feature of sql server.
Beside i heate SQL Server 2008 Without this feature
G.Antonios
I am trying to open an animation in a web browser.. and the same error is thrown when the animation is being loaded.... I have tried changing to x86 but does not solve the issue...
Note : The error occurs only when the animation with .HTML extension is loaded...
I have a WCF duplex with TCP binding (for the speed)hosted in Windows under a domain user. then I have a client not in the domain.
How should we configure the system to make it work?
It works fine for the users within the domain.
I don't like this behavior: "nServiceBus will iterate over all assemblies and classes to find out which ones implement the IHandleMessages<T> interface". As I understand this mean nServiceBus will load all assemblies into memory to scan. It's not good for large solutions. Is it possible to avoid this behavior and say to nServiceBus to scan only selected assemblies?
Yes it is, but I don't get why it's a problem.
First of all, it doesn't load them all in memory so that it would become a memory problem. Second, if you have so many assemblies that you think it might become a memory problem you either have only 1MB of memory in your system or you have way, waaaay too many assemblies. Make smaller applications?! :)
HOW TO CONNECT TO QUERY ANALYSER IN SQL SERVER2008
First,I want to thank you for this great tutorial.
I've followed all the steps and everything has been fine till now.
I'm trying to create proxy whith Visual Studio 2010 (the easy way). I've the "Add Service Reference" window open and I've entered the address:
http://localhost:8080/.
When I click on Go, I get this message:
An error occured while attempting to find services at 'http://localhost:8080/'.
Maybe did I forget something? or maybe did I mistake somewhere? Do you have an idea?
@Bamboula36 : Could really be anything, but I'm 99% sure there's something wrong in the configuration. Did you add more than in the example code? Did you download the example solution?
I have a very basic question. If you are hosting a WCF service in a Windows Service where are the webpages hosted if you want remote machines to access the WCF service? Remote access rules out using the visual studio development web server. Can you use IIS to still provide remote access without having IIS host the WCF service? If you can use IIS to host the webpages, how do you go about publishing the WCF service?
dst
A lot of questions... :)
Where are webpages hosted? Regular webpages are always hosted in IIS and WCF can't help with that. The webpages that need to access WCF can use any protocol supported by WCF to access the WCF service. Remote machines can do exactly the same.
Visual Studio dev webserver isn't a real webserver, it's only there for local debugging purposes. You should really use IIS to host websites.
I'm not sure why you keep talking about webpages and WCF service. These are completely different things!!!
The webpages are hosted on IIS, the WCF service can be anywhere else. Remote machines can access both of them, but both will have different addresses.
I have the feeling you're not telling me what it is you're trying to solve. You've only provided me the problem you have. What are you trying to accomplish?
Do you need a website that shows data to end-users and a WCF service that provides the same data to other applications? That should be no problem at all.
Also, why are you unable to host WCF in IIS? This is a better solution in almost any situation!!!
I follow your article step by step up to the display of the dispatchers which display correctly but my browsers are displaying server not found when i type the uri into them i.e http://localhost:8080/. I have checked all browser settings. I want to get this done before progressin with the tutoria. Thanks.
Johnson
ayomibayo@yahoo.com
@Johnson : Did you add the "httpGetEnabled" attribute in your configuration? That's the part that enables browsers to look at the wsdl
Thank you, this is a great article. I'm looking for an example of starting a WCF SOAP Project in VB.NET, can anyone recommend a website? Thank you.
I went through the example, but my project doesn't load, I'm using VS 2008. Do I have to use VS 2010 for it to work? Thanks.
Should be exactly the same, except for syntactic stuff that differs from VB en C#. Like defining variables and such.
No, you should be able to use VS2008 for this. Just the supplied downloadable solution won't easily load in VS2008 :)
This is really attention-grabbing, You’re a very professional blogger. I’ve joined your rss feed and stay up for searching for more of your fantastic post. Also, I’ve shared your web site in my social networks!
This blogpost is part of a series Template Method Pattern explanation Template Method Pattern example
Pingback from What Is .net Framework 1.1 | Snap Webhost