|
Regard!!!
So the question of Transfers to the client an amount of the expected result of functioning WebService (value must be considered on Server side and on the client its has to be seen before that datas will go... ).
I from here try put amount (in bytes) of the message in SoapHeader, which sends by Web service to the client...
On how much I has understood I can get it this way (or I’m wrong… )
public override Stream ChainStream( Stream stream )
{
siz = stream.Length;
return newStream;
}
Here is but afterwards то. шо has got (if has got 8-)) ) Запихиваю in SoapHeader воттак
public override void ProcessMessage(SoapMessage message)
{
if (message.Stage == SoapMessageStage.ХХХХ)
{
((SizeHeader)message.Headers[0]).size=siz;
}
}
So the question is:
What must be is ХХХХ ??? ????
If BeforeSerialize, then - not understandable what happens if I somehow shall else work with stream after serialisation (well for example compress by ZIP and this is the end - an size NOT CORRECT 8-((( )
If AfterSerialize, then before SoapHeader already does not accessible ... 8-(( It already as it were packed... Here is...
Help please... Or prompt other way
In russian...
Привет !!!
Короче ТЗ 8-)))
Задачка передачи клиенту размера ожидаемого результата работы ВебСервиса (цыфра должна быть посчитана на серваке и на клиенте её нада видить до того как пошли данные... ).
Я от тут пытаюсь SoapHeader запихнуть размер (в байтах) сообщения, которое отправляет веб сервис клиенту...
На сколько я понял выхватить его можно примерно вот так (хотя может я и гоню 8-)) )
public override Stream ChainStream( Stream stream )
{
siz = stream.Length;
return newStream;
}
Вот а потом то. шо получил (если получил 8-)) ) Запихиваю в SoapHeader воттак
public override void ProcessMessage(SoapMessage message)
{
if (message.Stage == SoapMessageStage.ХХХХ)
{
((SizeHeader)message.Headers[0]).size=siz;
}
}
Так вот собсно вопрос:
Чему должен быть равен ХХХХ ????
а) Если BeforeSerialize, то тогда - не понятно что произайдёт если я как-то ещё буду работать со stream после сериализации (ну например сожму зипом и все - размер НЕ ТОТ 8-((( )
b) Если AfterSerialize, то тогда до SoapHeader уже не достучаться... 8-(( Он уже как бы упакован... Вот...
Помогите плиз... Или подскажите другой способ
|
|
|
|
|
Hello,
(this is not April 1st joke!)
I have a need to override certain non-virtual methods of System.IO.Sockets.Socket class (and create MySocket descendant of Socket class). As far as I know, this can be done by dynamic creation of code via Reflection.Emit. I am searching for some more or less real working samples or a person who can help me with doing the task (I am ready to pay reasonable sum for a working solution). Thanks in advance.
Eugene Mayevski
Cross-platform information exchange framework
http://www.msgconnect.com/
|
|
|
|
|
You can use the new keyword to override non-virtual methods in a derived class.
For example (C#):
class MySocket : System.Net.Sockets.Socket
{
public new void NonVirtualMethodName()
{
}
}
Does this help? If yes, then can you donate the "reasonable sum" to the British Heart Foundation please.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
Unfortunately, reintroducing the method doesn't solve any problems. What we need is to change behaviour of socket's Connect, Receive and Send methods to change the data that are being sent (this is for SSH tunneling and some other things). The idea is that the class, that knows how to use Socket, will be able to use our socket class. In this scenario the mentioned methods MUST be either virtual or our code should be executed instead of default method code (and our code will decide how to handle the request - pass it to previous version of code or handle internally). Frankly speaking, I don't understand how class designers could be SO blind and brainless to make the methods static. Such limitation makes it impossible to create any extension to socket class (and I can imagine many uses of such extensions).
Eugene Mayevski
Open-source cross-platform information exchange framework
http://www.msgconnect.com/
|
|
|
|
|
Eugene Mayeski wrote:
What we need is to change behaviour of socket's Connect, Receive and Send methods to change the data that are being sent
So what you are saying is that you want to change the behaviour in the actual Socket class rather than in a derived class. Is that right?
Also, what do you mean by change the data that is being sent? (I don't know much about SSH tunneling so this might be a naïve question) If you are trying to change IP and TCP headers then you can forget using .NET Sockets. A friend of mine has been doing his final year thesis at University using .NETs Sockets to change the IP header and gave up because .NET either transmitted two headers or replaced his header with its own. He eventually solved the problem with a hook into the system at the NDIS level.
Eugene Mayeski wrote:
Frankly speaking, I don't understand how class designers could be SO blind and brainless to make the methods static
By "static" you mean non-virtual because the methods are not actually static as in non-instance specific ("Shared" in VB.NET terminology)
As to the design of the class, and while I can't speak for the designers, I have noticed that many implementations that provide extra functionality on top of a Socket connection do so by wrapping the socket into the class as a field/member variable rather than deriving from it. This includes classes in the .NET Framework itself (such as TcpClient and TcpListener)
Anyway, sorry that I've not been able to be more helpful. If I have any more ideas I'll post another reply. In the meantime good luck.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
I have installed my application which is built in C#.NET in the client machine. I have used Set-Up Project for this. After then i have done slight modifications to my application and again i tried to reinstall the application. But it is giving the message like 'Another version of this project is already installed.Installation of this version cannot continue.To configure or remove the existing version of this product, Use Add/Remove Programs on the Control Panel'. Is there any way other than uninstalling and again installing the application.
Mahesh Dara.
|
|
|
|
|
Assuming that you didn't break any existing components and you didn't introduce any new components that aren't compiled into the assembly, you don't need to reinstall the application, just copy the new files over the old ones. If you have to use a setup project for some reason, you need to build the original setup project in a way that identifies that it can be updated and then create the subsequent releases as update packages. I know this is possible with installshield... I'm betting it works when you create setup projects as well. Otherwise, yes, you have to uninstall it and re-install it.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
I had this problem when I was using wildcards in the AssemblyVersion. The way I solved it was as follows:
1. Created a class where the system constants are kept..
namespace myCo.Constants
{
public class SystemConstants
{
...
public const string SystemVersion = "2004.03.27.02";
...
}
}
2. Included the class in every AssemblyInfo file in the solution, and used the constant in the AssemblyVersion...
...
using myCo.Constants;
...
...
...
[assembly: AssemblyVersion(myCo.Constants.SystemConstants.SystemVersion)]
...
...
3. In the setup project for the app, I use the version number, converted as follows:
SystemVersion in Code Version In Setup
2004.03.27.02 04.03.2702
When the version is changed in the setup project, the system will give you a warning that the ProductCode and PackageCode should also be changed, and if you answer "Yes", the system will update them for you.
Also I have the "DetectNewerInstalledVersion" and "RemovePreviousVersions" set to true, that way the new version deletes any previous versions, but does not allow an older version to be installed.
Once we went to this procedure, I have never had a single problem with installs.
In my app, every time a version is released, a permanent copy of all the source is then archived, and the SystemVersion constant is updated accordingly, so is the setup project Version. Since the SystemVersion is in one place, it is easy to modify all of the assemblies, we have multiple setup projects, which are a bit of a pain, since I do them manually, but I do remember seeing an article here in CP that does the setup projects.
Hope this helps...
|
|
|
|
|
Thanks for your suggestion.
If i change the version no. of the setup project everytime when i rebuild then it's working fine i.e.,it is not giving any msg and it's reinstalling the whole application.
Upto here fine.but is there anyway to automate the process of changing the version number of setup project everytime when i rebuild.
|
|
|
|
|
I've done some printing in .NET by using PrintDocument and such. It worked grest when i just was printing some lists from database queries.
Now i have a RichTextBox, and want to print the content with all the text formatting (paper copies). Anybody know how to do this in an easy way?
|
|
|
|
|
We want to do a soft conversion from unmanaged C++ (VS6) to C#. Since our code base is rather large, we want to keep most of it, write all new stuff in C# and port the kept code later. This leads to my question:
Is it possible to call a .Net-DLL from outside .NET?
Thanks in advance,
Eric
|
|
|
|
|
|
Uhm, sounds difficult. I guess I need to to some further reading.
What about the other way around (calling native DLLs from inside the managed environment)?
Thanks for your patience,
Eric
|
|
|
|
|
There are a few possibilities. Roman has already mentioned hosting the CLR. Two other ways are to use COM Interop (expose your C# components as COM objects) or to provide flat exports (i.e. the same as an unmanaged DLL would have).
The CLR supports the flat exports feature, but it's only exposed through Managed C++ and IL, so you either have to write a shim layer in Managed C++, or disassemble your C# code with ILDASM, add some declarations in IL, and recompile with ILASM. Not a lot of fun. I advise doing this only if you need to extend a program whose extensibility model is based around flat DLLs in this way.
C# objects can be registered with COM using the regasm program, or with Windows Installer.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi,
I have a richtextbox, i've selected some text with the mouse, now i want the selection highlighting removed programatically... how to do that?
Thanks...
|
|
|
|
|
In VC6, adding a new file to your project would automatically prompt you to add it to source control. Now we are using .NET and this is no longer the case. Does anyone know if there are any settings required to get this working? I'm guessing they moved it elsewhere, or it's a total oversight.
Thanks!
|
|
|
|
|
When you add a file to a source-controlled project, the file is in a checked-out state event though it hasn't been added to the VCS (like SourceSafe, CVS, etc.). When you check-in the file, it is added automatically. There's really no point in adding the file to a VCS when you just created it. If you created a file then promptly removed it, the VCS wouldn't even care since you made all these changes locally.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Interesting, that concept certainly makes a lot of sense, but I'm still missing something. We are using Perforce and I use Perforce to submit my changelists rather than .NET. When I do so, the new file I have "checked out" doesn't exist in the changelist so when I submit, it doesn't get added.
What do you suggest?
|
|
|
|
|
After you add it, check in your project (recursive check-in) or just the file itself. If you click the options button on the toolbar, you can select "Check-in but leave Checked-out" or something like that so that it is added but remains checked-out so you can edit it.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Okay, I'm going to start using VS.NET to check in my changes in the meantime.
The difference with Perforce that actually makes this a non-issue with VC6 is that when VC6 prompted you to add the new file to Source Control, it would add it to a your pending changelist. If you decide against adding the new file before submitting, you can simply revert the file from Source Control before you submit it and it will never show up.
SourceSafe was much more annoying because when you added the file to SourceControl, it was immediately added to SourceSafe, you would keep the file checked out, and if you later changed your mind you had to delete it.
Basically, it comes down to .NET not giving me the option to automatically add files to source control. But now that it's fixed for the SourceSafe case, it breaks Perforce's case . So either .NET needs to add the feature back or Perforce needs to add support for figuring out that a new file has been added and add it to the changelist prior to submission. Or both!
EDIT: Okay, this is bringing up a number of issues that remind me of the reasons why we use Perforce to submit rather than VS.NET.
- No support for multiple changelists
- Our solution doesn't have any of our data files (other than INI type files) -- effectively making gets useless.
- Also because of the previous point, I still need to check out files like EXEs that aren't in the solution before submitting.
- It doesn't automatically add the new files, I have to check them first.
- Probably lots of other things.
Do you see where I'm coming from now? I appreciate all your help. I guess I just want my check box back
|
|
|
|
|
I'm writing an .NET Windows Forms application in VB.NET for a customer and have to send mails thru their Lotus Notes (v5.11) mailing system.
I'm not allowed to use SMTP due their to security policy so I'm forced to somehow send mails directly to Lotus Notes.
Any ideas on how to accomplish this ?
Any 3. part controls I can use or sample code maybe ?
TIA
/Klaus
|
|
|
|
|
IIRC (I worked with Lotus Notes a long, long time ago), the Lotus Notes client has an ActiveX interface. If you install the client on a machine, you can send e-mails directly.
BTW, good luck (you'll need it): Lotus Notes is the most buggy piece of software I have worked with.
Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski
|
|
|
|
|
I have created a dll file and 2 lib files using VC++6.0. I have a tester application which test the functions in these dll and lib files. Now I want to debug my project using vc7.0. I have the .NET framework 1.1 installed(I don't have the MDE). How can I compile the project from the command prompt(cl.exe)? Is there any article which gives me information on this.
I have seen the options given in MSDN. Can anyone give me some sample commands. I have tried certain options, but it gives me an error, undeclared, in Program Files\Visual Studio\vc98\Include\Utility.
Can anyone help me pls..
Thanks
Vini
|
|
|
|
|
If you created the project in VC6.0 then you don't need the .NET Framework as your application won't be using any of this framework. (Unless of course there is some detail that you've not mentioned that necessitates the presence of the .NET Framework)
You may find your answer if you post your question in the Visual C++ Forum.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
Thanks.. but the dlls and lib's I have created , I want to test it from a vc.net debugger. So, as the first step i wanted to execute the existing vc6.0 project in .net framework. Can anyone help me with the compiler options? How to link multiple lib files(system lib and user libs), during compilation.
Thanks...
Vini
|
|
|
|
|