|
Jonathan Snyder wrote: When you deploy a vb.net application to a server, does it have to be in the wwwroot folder?
No. If you create another root in IIS, it can be created under a different folder. But, I've never seen anyone go through the trouble other than ISP's.
Jonathan Snyder wrote: if jpg's aren't showing on the application what problem might be causing that?
Usually, the wrong URL path specified in the HTML.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sir,
I have created a windows forms control in which I put a DSO Framer control. I have compiled it and registered in GAC. Even its doing fine when I used it in another windows application. But When I try to put it in a web page its not showing anything as it is the same thing showing the required word doc in windows application.
Please tell me what are the steps do I need to take to make it fine. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Please, PLEASE don't start cross posting the entire site again . This is an ASP.NET question, it's the ASP.NET part that is the problem. You've asked there, so leave it at that.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Its Ok. But only in two related parts of this forum. It wont be be a problem. I will not do as I did earlier. I will post in two forums only. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi friends am Nithin.
I had done 4 or 5 webservice using http post method and wsdl...
Am facing some trouble for making the soap request(in C#) for Apache server (in java).
Can any one help me how can make a soap request for this server????
Rgds
Nithin
Thanks
|
|
|
|
|
Hi all
I have to find all LAN Machines IP Addresses and machines name so can any body tell me hoe it is possible and which namespace and API i have to use for that.
Thanks & Regards
Bankey
|
|
|
|
|
There is no namespace or API that will do this. You have to generate a list of valid IP addresses for your subnet, then try and PING each one of those addresses to see if it responds. Even then, the list you generate may not be accurate if a machine is at the address, but is powered off or in the middle of rebooting.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Has any one had any experience with this exception. From what I understand it involves a problem with the MSIL compiler and JIT. After googling the exception, I found that almost all of the cases were different in their beleived cause for failure and mine, like the rest did not match anyone elses.
Well, after taking apart the code line by line (This error does not let you execute the base method, stops before the method is called) I finally deduced where my problem was!!! I had used => in C# instead of <= comparative operand. The compiler did not pick this up as an error and just failed to operate the method containing this.
I am eager to find some one else who could see if this is just my machine or is it in the framework itself. Also, I would like to know more about this exception.
Our developers never release code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
|
|
|
|
|
Can you post a code fragment with the => operator? I just tried to see if I could replicate it, and it's marked as an error during compile.
|
|
|
|
|
Yes I can, I created a quick one class program that throws the error:
class Program
{
static void Main(string[] args)
{
decimal testDec = TestErr();
Console.WriteLine(testDec);
Console.Read();
}
public static decimal TestErr()
{
decimal one = 1.555M;
decimal two = 5.8888M;
if (one => two)
{
one += two;
}
else
{
one -= two;
}
return one;
}
}
Also, it might help to note that I am currently using .Net 3.0 instead of 2.0. I could not replicate the results on my home dev machine running 2.0. I need to find some one else with 3.0 framework to see if this is where the issue lies or is it unique to my machine.
Thanks
AAron
Our developers never release code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
|
|
|
|
|
=> is an operator in 3.0 for Lambda expressions. Are you confusing it with the >= operator?
|
|
|
|
|
No, I was tired and being sloppy in my coding and inserted => when I wanted >=. This mistake should have been caught in the visual studio 2005 environment as an error, but it built cleanly. I understand that the syntax was wrong, but it let me run with no errors. On my home dev machine, the interface caught this as an error.
AAron
Our developers never release code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
|
|
|
|
|
Actually, the operator is valid, so the compiler may no capture it. You're probably not running 3.0 at home, because 2.0 doesn't have this operator, thus flagging as an error.
|
|
|
|
|
I am running 2.0 at home. So theoretically you can compare two values with a lambda(=>) expression? If not, this should have been recognized as an invalid argument and displayed an error. I understand that the syntax is used in 3.0, but is it used in the describe context?
Our developers never release code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
|
|
|
|
|
Intellisense works by doing partial compiles of your code in the background, as you write it. The compiler didn't catch an error because there wasn't one. The expression is perfectly valid, it just doesn't do much except return the value of two .
You can find a little more on it here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Which explains while it bombed at runtime - the if statement only accepts boolean results.
Our developers never release code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
|
|
|
|
|
You got to be using 3.0 without knowing it. I just tried your example on a GUARANTEED 2.0 machine (it's never seen .NET 3 installed on it) under VS.NET 2005 and VS flagged the operator as an Invalid Expression before I even hit Build.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Yes, I am using 3.0 on the machine that threw the error, I thought I had made that clear. A coworker of mine ran it on his which is running 3.0 and did not get the error. So it's not a 2.0 or 3.0 issue. The only other difference might be linq or it might just be my machine.:->
Our developers never release code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
|
|
|
|
|
I have a fairly standard forms-based application with a lot of data-bound combos (DropDownList style) in it. Everything works fine except when the form is used to edit a 'new' object. In that case, all the form fields should be cleared. But combos dont show in cleared state, they just keep displaying the first value in the list. So now the user thinks that a value is already selected for him, but the application doesnt actually update the bound property of the object unless some other value is selected in the combo.
Lets say I have these two classes in my app.
<br />
class SelItem<br />
{<br />
public string Id { get; set; }<br />
}<br />
<br />
class MyObj<br />
{<br />
public SelItem Selection { get; set; }<br />
}<br />
To fill the drop down list of the combo i use (Id is a string property of the objects im passing through valuesList):
<br />
combo.DisplayMember = "Id";<br />
combo.DataSource = valuesList;
and using the forms designer I've bound the Text & SelectedValue of the combobox in this way (bindingSource contains a list of MyObj):
<br />
combo.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", bindingSource, "Selection", true));<br />
combo.DataBindings.Add(new System.Windows.Forms.Binding("Text", bindingSource, "Selection.Id", true));<br />
Currently, I'm clearing the combo-boxes by setting their SelectedIndex property to -1 every time a 'new' form is launched, but thats just a hack. Anyone got an idea why isnt the combo taking care of this automatically.
|
|
|
|
|
I am having problem regarding debugging MMC application which is developed using C# and .Net version 1.1. Currently I have installed .Net version 2.0 and now if I try to debug the application it starts normally and when I try to add an existing snap-in using Add/Remove snap-in option of MMC the application closes without any error. If I run the application in release mode it works fine.
If I uninstall .Net 2.0 then I am able to debug the application but I don’t think this is a good solution.
If any one have faced similar problem or having any idea regarding this issue please help.
Regards,
Prakash Kalakoti
|
|
|
|
|
I want to convert an application written in VB.NET into a Window service. I tried an example which writes to the event log every 10 secs. Following is the code i wrote in a timer's tick event:
Dim MyLog As New EventLog() ' create a new event log
' Check if the the Event Log Exists
If Not MyLog.SourceExists("MyService") Then
MyLog.CreateEventSource("MyService", "Myservice Log")
' Create Log
End If
MyLog.Source = "MyService"
' Write to the Log
MyLog.WriteEntry("MyService Log", "This is log on " & _
CStr(TimeOfDay), _
EventLogEntryType.Information)
The timer is enabled in the OnStart(). The Service got installed using the InstallUtil command. And I was able to start the service. But this was not my requirement. I tried to display a message box instead of writing to Log. So I replaced the above code with a line to display a messagebox; ie it brings up a messagebox every 10 secs. The service got installed but it did not start. It brought up a dialog saying "The service returned no error. This could be a problem with the internal Windows....". I tried writing similar code like showing a form but all returned the same problem. But it works with code written above but if it contain any MsgBox then the problem occurs. Is it possible to write pure VB code in a Window Service?
|
|
|
|
|
A service is usually run under the System user account. There is noone logged in using this account, so there is nowhere that the service can display any user interface. Even if you run the service using your own user account, it might not be able to show a user interface. A service is not supposed to have a user interface.
If you want a user interface for your service, write a regular program that monitors the service.
---
Year happy = new Year(2007);
|
|
|
|
|
I have set the Account as Local system, then it should work irrespective of user account. But how can you say that a window service is not supposed to have a user interface while Norton Antivirus does have one.
-- modified at 5:02 Thursday 18th January, 2007
|
|
|
|
|
tonymathewt wrote: Local system, then it should work irrespective of user account
No, it doesn't. Services run under their own Desktop, not the one the user sees and interacts with. The only way you can get an interface to show up is to go into the Services manager, get the Properties on your service, go to the LogOn tab, make sure it's using the Local System account, then check the box that says something like "Allow service to interact with desktop".
But, like the other poster said, Services are not supposed to have a user interface, so don't expect to just start throwing forms all over your service and watch them work. Services do not get their own message pump like a normal application does. This is something that is required to make forms and events work properly in VB.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thankyou dave I understand that it is a regular application that has the UI not the service. But I need my application to come up while the system is booted. Could you give me a simple example like an application that displays a messagebox.
|
|
|
|