|
Don't Repost.
Sathesh.
Blessed is the season which engages the whole world in a conspiracy of love.
|
|
|
|
|
510 and what??
Look - the processor cache is off limits to you. You have no control over it and it is an exceedingly rare case that you ever need to go to that depth to improve performance and certainly not in a paint application.
This will not solve your problem. If you're having performance issues with your application, review the design or your app and it's code to look for better techniques of doing what you are and optimize the code as much as possible.
What you've described about your code, or more to the point, the lack of description, there's nothing we can say to help you.
|
|
|
|
|
I am using VB.NET.
I am new to web services, and have been given the instruction that I am to send an XML document via HTTPS POST and receive a response XML document. The web service address I have been given has no ASMX file, WSDL file or DISCO, so from what I can gather I cannot use dot.NET's built in web service controls. The address I have been given to post these calls to, is in is the following format:
https://www.server.com/WebService
(I have replaced the real server name)
I swear I have read the entire internet on the topic.
I have a couple of questions
1) can it be done with a web service address formatted such as the above (no ASMX WSDL)?? (I presume it must)
2) Are any of the approaches I have attempted below valid / should work?
3) I keep receiving an error "unable to connect to the remote server", are my issues all their fault? (I doubt it) and if not, what am I doing wrong? How can I do this?
Approaches I have tried include:
(don't get too caught up with the fact some are incomplete or some of the data or calls look silly, I'm really trying to illustrate the techniques that have failed)
Dim oRequest As HttpWebRequest = WebRequest.Create("https://www.server.com/WebService")
Dim oStream As Stream = oRequest.GetRequestStream
Dim oXML As Xml.XmlTextWriter = New Xml.XmlTextWriter(oStream, Encoding.GetEncoding("UTF-8"))
address = New Uri("https://www.server.com/WebService")
request = DirectCast(WebRequest.Create(address), HttpWebRequest)
request.Method = "POST"
request.ContentType = "application/x-www-form-urlencoded"
<WebServiceBinding("SomeBindingName", "SomeBindingNS")> _
Public Class CustomProxy
Inherits SoapHttpClientProtocol
<SoapRpcMethod(Action:="urn:AstroIntf-IAstro#GetSunriseInfo", RequestNamespace:="run:AstroIntf-IAstro")> _
Public Function GetSunriseInfo(ByVal Latitude As Double, ByVal Longitude As Double, _
ByVal Year As Integer, ByVal Month As Integer, ByVal Day As Integer, _
ByVal TimeBiasMinutes As Integer) As String
Me.Url = "https://www.server.com/WebService"
Dim ret() As Object
ret = Me.Invoke("GetSunriseInfo", _
New Object() _
{Latitude, Longitude, Year, Month, Day, TimeBiasMinutes})
Return CType(ret(0), String)
End Function
End Class
Dim oClient As New WebClient
Dim oStream As Stream = oClient.OpenWrite("https://www.server.com/WebService", "POST")
Dim oWriter As StreamWriter = New StreamWriter(oStream)
oWriter.WriteLine("Hello world")
oWriter.Close()
and good old fashioned html:
<form target="_blank" action='http://www.server.com/WebService' method="POST">
<table>
<tr>
<td>Enter something:</td>
<td><input type="text" size="30" name="test1" /></td>
</tr>
<tr>
<td></td>
<td align="right"> <input type="submit" value="Submit" /></td>
</tr>
</table>
</form>
|
|
|
|
|
I have a problem regarding my tcplistener. I went to MSDN to get the example for tcplistener and found out that it listen to character by character which is not wat i wan. Is that a way whereby i am able to read the client request as a sentence and not character??
|
|
|
|
|
The TcpListener object merely listens for connection requests. When a connection request comes in, you can either use that as a trigger (Which I have done for some purposes), or you can issue an AcceptTcpClient to create a TcpClient object for transmitting information back and forth.
Additionally, the TcpListener object does not have events and you "should" have it configured as a listener thread that simply loops and checks for connection requests.
I don't claim to be a know it all, for I know that I am not...
I usually have an answer though.
|
|
|
|
|
I am trying to limit the length of text that a user can enter into a text field in a propertygrid. I really prefer not to have to add a form with a textbox and a button to accomplish something that should be so simple. On an ordinary textbox, you can easily set this, but not when it is in a propertygrid. I have spent several days searching for ways to do this, but have been unsuccessful. I tried to add a class that inherits from a textbox and set it that way, but when I run the application, I can not type anything in the field.
Thank you for your time (and hopefully willingness to help)
Nick
|
|
|
|
|
I've only used the property grid a couple times. I created a class with exposed properties and set the propertygrid.selectedobject = to the class.
In the property's description (displayed at the bottom of the property grid), could state "The length should be between x and xx amount of characters". In the property set statement, you can then check the length prior to setting your variable = value and display a messagebox if the length is outside your required range.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
How do i specify path to a file on another computer on the network
thanks
|
|
|
|
|
you have 2 ways:
\\terminal id\folder/share name
\\ip address\folder/share name
you obviously need security to do the above...
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
|
If you are in a windows application, there is no cache. Read about Singleton pattern and how it is implemented.
If you are on an ASP.NET application, you can use cache("name") = YourArray . But then you are in wrong forum. Try ASP.NET forum.
|
|
|
|
|
yes i am in windows application in vb.net but i am not success in store array in catch memory plz send some code for use cache memory.
thanks
Vineet Swami
Isol
|
|
|
|
|
I'm pretty sure this is completely controlled by your computer's hardware and you cannot directly tell your computer to cache something in any programming language. Bascially cache is relatively small so your computer has some algorithms that generally move the part of your program that is in use into the cache and move it out when it is not. This works more than 90% of the time so I wouldn't worry about it too much.
There are ways to indirectly affect cache hit rates and make your program slightly faster but since you are a begginer I would recommend you learn how to use the language first and worry about making your program fast later (assuming it is not fast enough already).
|
|
|
|
|
Yes, such an optimization should be really subtle.. If speed is so important to you, use C++ instead of .NET.
|
|
|
|
|
Try looking for Enterprise Libray Caching on the Microsoft site - they have a load of ready to use blocks - probably over tbhe top for what you need, as I suspect all you are really looking for is a method of only reading the data once. Try googling for 'shared' (VB) or 'static' (C#)
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Dear All
i am trying to send email using vb.net i am using this code and on my PC it's OK but on others not,
the point is the outlook account created on that PC for a Gmail account and i need to send it using the smtp server on another account i tryed to use the property "omsg.SendUsingAccount" can any one help plz
Dim oApp As Microsoft.Office.Interop.Outlook.Application
oApp = New Microsoft.Office.Interop.Outlook.Application
Dim oMsg As Microsoft.Office.Interop.Outlook.MailItem
oMsg = CType(oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem), Microsoft.Office.Interop.Outlook.MailItem)
oMsg.Subject = "Hello!!!"
oMsg.Body = "Hello World"
oMsg.To = "zzzzzzz@zzzzz.com"
oMsg.Send()
|
|
|
|
|
I think you should looking for this.[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
thanks
but i am dealing with a smtp using exchange 2007 this is why i am using CDO1.2.1
modified on Monday, October 20, 2008 9:39 AM
|
|
|
|
|
If you're connecting to Outlook (at client side) using CDO, the client must have both Outlook and CDO installed. I would guess that the non-working PC is missing the other one.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi,
When I use this internal function my program automatic create a folder for the use of the program. Thats fine, but it also create a subfolder with the version number. Is there a way to avoid the creation of the subfolder?
I use this code:
sFile = New IO.DirectoryInfo(Application.LocalUserAppDataPath).Parent.FullName
I use now the parent becourse I dont need that subfolder!
Jan
|
|
|
|
|
Your post is confusing. Try this method instead:
my.Computer.FileSystem.CreateDirectory(strYourDirectoryPathHere)
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
The way you suggest is create the folder yourself.
with Application.LocalUserAppDataPath the system automatic locate the correct place on the harddisk. On my PC it is:C:\Documents and Settings\UserLogin\Local Settings\Application Data
and then CompanyName\ ProductName\ ProductVersion
The variable sFile is of the type string. Later in the program I add the filename and I open that file with an xmlreader.
I know some (strange) persons who change the doc & set folder. So the program must also work for them
|
|
|
|
|
You can use Environment.GetFolderPath[^] to return the path to the Application Data folder. From there, you can create your own company and application subfolders and use that path as the root for your data. This is the same method Application.LocalUserAppDataPath uses as a base path to build the userdata\Company\Application\Version path that it returns to you.
Keep in mind that there are TWO app data paths. The one you're using returns the data path for non-roaming profile users. The Application.UserAppDataPath method returns the app data path for romaing profile users. Environment.GetFolderPath will also return those same paths, depending on which SpecialFolder enumeration value you use.
|
|
|
|
|
Thanks all.
I'll give this a try.
Jan
|
|
|
|
|
you could use:
my.Computer.FileSystem.GetDirectoryInfo(system.Windows.Forms.Application.LocalUserAppDataPath).Parent.FullName
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|