|
I have seen talk on google about setting the sessionState parm in web.config = "StateServer"
Would that help?
IMHO Stateful web services is kind of an oxymoron that opens up a large can of worms.
Can't you store your state in the registry or DB?
|
|
|
|
|
I found the answer:
On the line that says [WebService]
change to
[WebService(EnableSession=true)]
and it works!!!!
modified 29-Aug-18 21:01pm.
|
|
|
|
|
MS implemented tabs in VS .NET, a feature they ignored
in previous versions (good, old CBuilder . But did they
forgot to add a build-incrementing function again?
(like the one in the good, old CBuilder)
(well in C# and .NET it could be something different but
I cannot figure it out in the C++ version at all - the
"classic one, the unmanaged one")
All the free add-in for VS 6.0, I tried, didn't work.
BTW I haven't seen the good, old CBuilder for years but I
feel that VS .NET reminds me very much the good, old
CBuilder.
|
|
|
|
|
Zinj wrote:
But did they
forgot to add a build-incrementing function again?
Nope, well not in C#. Just go to Project Properties, Configuration properties, Advanced, set incremental build to true. Now, goto AssemblyInfo.cs and make sure the following looks like this:
[assembly: AssemblyVersion("1.0.*")]
Now the part with the "*" will auto increment.
NOTE: This is on by default for debug builds and off for release builds.
Hope this helps
|
|
|
|
|
does sombody knows why myDateTime.AddMinutes doesn't do anything?
i am trying to do:
DateTime myDateTime = Convert.ToDateTime("18/09/2002 13:00");
myDateTime.AddMinutes(40);
but nothing happen to this myDateTime??
thanks in advance, sharon
|
|
|
|
|
sharon wrote:
DateTime myDateTime = Convert.ToDateTime("18/09/2002 13:00");
myDateTime.AddMinutes(40);
Try myDateTime = myDateTime.AddMinutes(40)
The Add... methods only return another DateTime, they don't modify the object. This is pretty much common across the .NET Framework.
Paul
|
|
|
|
|
thank you very much, it was very helpfull, sharon
|
|
|
|
|
Hi !
I'd like to know how can I pass parameters to an ActiveX in a c# windows application. As far as I know, the ActiveX control implements IPersistPropertyBag so that the container in html can pass the params through the Tag PARAM in the HTML tag OBJECT. However, I don't know how to do it within a c# application.
Please, somebody could help me ???
thx in advance,
|
|
|
|
|
Derive AxHost, you've got the following protected load methods :
DepersistControl();
DepersistFromIPropertyBag(IPropertyBag propBag);
DepersistFromIStorage(IStorage storage);
DepersistFromIStream(IStream istream);
DepersistFromIStreamInit(IStream istream);
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Sorry but I'm quite new in c# and I don't know exactly what u mean, could u please explain it?
When I add my Ax control "myCtrl" in the aplication, I think Aximp.exe creates AxmyCtrl which is the wrapper for my control and is dervied from AxHost.
However, if I derive this class, I can't find the protected methods u talked about. I've looked in the help for the members of AxHost and I don't find those protected methods.
Could u tell me more exactly what should I do?
thx for everything,
ORi.
|
|
|
|
|
Using an ActiveX with .NET is achieved with one of these :
- you simply want to drag&drop the component onto a form. So yes, you import it from the Toolbox Window, and when you drop it, the .NET environment creates two wrapper assemblies (one for the ActiveX layer, one for the underlying COM layer). That's perfect as long as you just need to call methods, properties, and stuff. I would think that, once activated in a form, the ActiveX would by itself (I mean with no additional code) selfs depersists, hence load the previous state, but eh... who knows...
- the other solution is to bypass the wrapper assemblies, and derive the System.Windows.Forms.AxHost class. Once derived, you just need to implement a few methods to get this class actually attached to the underlying ActiveX. For more info on it, just googlesearch with "AxHost" : you'll find code. What I said in an earlier post is, once the class is derived, you may call one of the listed methods in the constructor (or any adequate place) to load the previous state.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
How can I make a beep sound in C#?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Declaration :
[DllImport("kernel32.dll", CharSet=CharSet.Auto)]
static public extern bool Beep(Int32 dwFreq, Int32 dwDuration );
Usage :
NativeWIN32.Beep(1000,1000);
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Hi all
Anyone got any recomendations for a Static Analysis tool that can be used in C# to find bugs, glitches, inconsistencies etc - i.e. finding run-time errors at design-time?
Basically any info on something similar to PC-Lint used in C/C++ would be ideal.
Cheers.
|
|
|
|
|
You've got FxCop[^] for instance (see gotdotnet.com).
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Hey I tried that, and I got so many errors in my code (cant remember what I was testing though), so I uninstalled it . Maybe a newer version is out, and maybe my code looks (is) better now. I'll give it a try again.
|
|
|
|
|
OK, so I got a @#$#load of errors again, though most of these "errors" are totally biased design "rules" (really only considerations).
EG all priority 1:
MemberNameKeywordCollision:
The member name 'Stop' conflicts in whole or part with reserved keyword 'Stop'. //yeah right, maybe with your code, but not with mine
EventHandlerNamesEndInEventHandler:
Rename 'BASSProgessHandler' to end in 'EventHandler'. //why make the name even longer, it wont effect the code.
EventFirstParameterIsNamedSender:
Change the first parameter of 'Progress' to an object type named 'sender'. // hell, i cast enough, why do i need to cast even more?
MemberOnlyShortAcronymsAreAllCaps:
Correct capitalization of member name 'get_ChannelEAXMix'. // again, who cares? EAX looks better to me than Eax (that looks more like some assembler function, maybe FXCop will complain about it too
ExceptionsRequireMultipleConstructors:
Add a constructor with a string parameter to custom exception 'BASSException'. Add a constructor with a string parameter and exception parameter to custom exception 'BASSException'. Add a protected constructor with a SerializationInfo object parameter and a StreamingContext object parameter to custom exception 'BASSException'. // again why? if you dont need it, why clutter your code with useless code?
TypeNameKeywordCollision:
The type name 'Error' conflicts in whole or part with reserved keyword 'Error'. // reserved????
MemberNamesDontUseUnderscores:
Remove the underscore from 'BASS_OK'. //if its not OK, why even make it legal to use?
ParameterNamesUseCamelCasing:
Instead of parameter name 'Length', use 'length'. // i cant help it if i hit my caps lock by mistake.
TypesDontExposePublicInstanceFields:
Make 'fWetDryMix' private or protected and provide a public property to access it. // Properties dont allways work when u need to "chain" a few, also the extra processing (repeated get/sets) makes it inefficient.
NamespaceNamesUsePascalCasing:
Instead of namespace 'nBASS', use 'NBASS'. //no, nBASS looks way cooler
and now for the 2 (yes only 2) usefull ones (priority 1):
AssembliesShouldBeStrongNamed:
Sign 'nBASS' with a strong name key. // not neccesary, but recommended.
MethodShouldKeepAliveIntPtrIfFinalized:
Add a GC.KeepAlive(this) to the method 'Void Stop()'. //i have no idea what they mean...does look like it could break my code though.
Any comments welcome
|
|
|
|
|
This looks somewhat funny and ironical, especially when you know that the MS framework assemblies don't have pass the exam with 0 error. That is, the .NET framework does not strictly follow the .NET design guidelines.
Looks like a FXCop filter feature is welcome, so we only get relevant problems.
I am pretty sure the FXCop forum on gotdotnet is full of rant already...
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
StephaneRodriguez wrote:
This looks somewhat funny and ironical, especially when you know that the MS framework assemblies don't have pass the exam with 0 error. That is, the .NET framework does not strictly follow the .NET design guidelines.
Strictly is weak work in this case, I tried mscorlib.dll. I had about 100x the "errors" I had in my assembly .
StephaneRodriguez wrote:
I am pretty sure the FXCop forum on gotdotnet is full of rant already...
Unfortunately my GPRS can only handle one webpage (is it so bad in other countries?), so i choose CodeProject
|
|
|
|
|
Cheers for the comments folks - i also found this to return loads of Priority 1 violations that i would not necessarily consider to be of that importance (if at all) but as you can toggle the rules on/off before you check the assemblies i'd rather have to many 'insignificant' things flagged than not enough.
There are plenty useful things flagged as well - i guess you could say it's thorough
Thanks
|
|
|
|
|
Martin D wrote:
There are plenty useful things flagged as well - i guess you could say it's thorough
Definately!
I just thought of an idea for a competition. Person that wins must make the most functional library passing all tests in FXCOP.
|
|
|
|
|
For sh*ts and giggles I ran FxCop on my wizard framework[^].
Results:
8 Priority 1 problems. Four of them are caused by the collection generator[^] that I used (and submitted a slight modification for ). Two are caused by a the upper-case constant that you got bit by. And the other two are pointing out that I should put a CLSCompliant attribute on it and demand permissions.
16 Priority 2 problems. 10 of them are from my private/protected members that fire events for me (basically calls On* with the EventArgs passed in). Another 5 from the collection generator
1 Priority 4 problem. Yet another one caused by the collection generator.
If I ignore all the collection generator problems that leaves me with 13 problems
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
WOW!
James T. Johnson wrote:
And the other two are pointing out that I should put a CLSCompliant attribute on it and demand permissions.
I just added CLS compliance to my lib . Just looking for more bugs before I update. Maybe add a "few" suggestions from FXCOP (or is that FXCop).
BTW, bit off topic. Why do u spell .net Server like that and have the .NET framework. I dl'd RC1 and was a bit suprised to see that on the boot logo screen. Especially, after being advised never to use .net, not ever.
|
|
|
|
|
leppie wrote:
Maybe add a "few" suggestions from FXCOP
I think I will too; plus make another change in the collection generator templates.
leppie wrote:
from FXCOP (or is that FXCop).
Neither, FxCop
leppie wrote:
Why do u spell .net Server like that and have the .NET framework.
Microsoft marketing never asked the rest of the company how to spell it
It's sad that they would let something like that happen since it lends even more inconsistancy to printed media when it's talked about.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
leppie wrote:
functional library passing all tests in FXCOP.
Look ma[^], no violations!
Time for me to really go to bed now, I mentioned in an e-mail I was going to bed an hour ago
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|