|
I have a web service that feeds my Windows application when the network is down and for the life of me, I can't get this damn thing to work. Error:
<br />
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: Unable to generate a temporary class (result=1).<br />
error CS2001: Source file 'C:\WINNT\TEMP\-7n_vwzf.0.cs' could not be found<br />
error CS2008: No inputs specified<br />
<br />
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, CompilerParameters parameters, Evidence evidence)<br />
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, CompilerParameters parameters, Assembly assembly, Hashtable assemblies)<br />
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)<br />
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Evidence evidence)<br />
at System.Web.Services.Protocols.SoapServerType..ctor(Type type, WebServiceProtocols protocolsSupported)<br />
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()<br />
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)<br />
--- End of inner exception stack trace ---<br />
I'm not sure on what to post to get the answers I need. This is my first attempt with web services.
Any and all help will be greatly appreciated
|
|
|
|
|
One of ASP.NET's little quirks, you need to give the ASP.NET Machine Account (Usually ASPNET) write access to the Temp folder in the Windows directory.
I believe it needs this to compile classes used for serialising the SOAP requests.
|
|
|
|
|
OUT STANDING !
I thought I'd _crew'd it up. That work perfect. Thank you.
|
|
|
|
|
Hi! Please help with this issue:
I have sqlDataSource DS (used for bring data to dropdownlist) and I want to use
InsertCommand for executing parametrized SQL.
DS.InsertCommandType = SqlDataSourceCommandType.Text
DS.InsertCommand = "insert into jtest(test_text) values (@mnf_text)"
DS.InsertParameters.Add("@mnf_text", DropDownList1.SelectedItem.ToString.Trim)
DS.Insert()
works fine!
If I want to use stored Procedure mode, it doesnt work with parameters, may be,
I guess, in this case order of params is important and not a name.
DS.InsertCommandType = SqlDataSourceCommandType.StoredProcedure
DS.InsertCommand = "insert_proc"
DS.InsertParameters.Add("@mnf_text", DropDownList1.SelectedItem.ToString.Trim)
DS.Insert()
Doesnt work!
|
|
|
|
|
My current situation is that I have a program that opens a form for processing, while the menu/main screen of the program is still open. On the main screen i have a menulist that contains shortcut keys for items on the menu. I was wondering if it was possible to be able to override those shortcut keys, and assign those same shortcut keys to buttons on the form that is opened for processing. I tried messing around with the keyDown property but it doesn't get fired before the previous shortcut key (on the main load screen)
Thanks in advance.
Nathan Lindley
.NET Aficionado
|
|
|
|
|
Hi,
Is there any open source vb 6 code to convert TIFF images to GIF or Jpeg
|
|
|
|
|
VB6 plain cannot do that. GDI+ can, if you can control it in VB6, or if you write a COM dll in C++ that uses GDI+ to do it for you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
Why not load image-magick (I think thats how it is spelt) you can call it by launching the process and controlling the IO devx has a great article on launching and controlling processes.
|
|
|
|
|
I have the following code but the exception occurs : System Failure sending message. What should i do, the code is:
Imports System
Imports System.Net.Mail
Public Module Module2
Sub Main()
Dim EmailTo As String 'Emailaddres for user to send
Dim EmailFrom As String 'Emailaddres for user from
Dim MailSubject As String 'Subject of Mail
Dim MessageBody As String 'Message
Dim ServerName As String 'Server Name - important
'Add in EmailTo, EmailFrom etc parameters here
EmailTo = "<email to>"
EmailFrom = "<email from>"
MailSubject = "<Subject Line>"
MessageBody = "<This is the email>"
ServerName = "<servername>"
'Set the SMTP Server's address
Dim myClient As New smtpClient(ServerName)
'Enclosed within Try-Catch block to catch exceptions in case of errors
Try
myClient.Send (EmailFrom, EmailTo, MailSubject, MessageBody)
Catch ex As Exception
MsgBox ( "Delivery Failure: " & ex.Source &" for " & ex.Message )
End Try
End Sub
End Module
Thank you.
Khurum
|
|
|
|
|
I came here to post a question about email myself. From what little I have learned about it so far, I would check the Send() function to see what it expects for arguments. If they are all strings then I have no idea, but if some of them are supposed to be objects maybe a string is not a valid substitue for that type of object. For example, EmailTo may be an array or object capable of containing multiple addressees.
>>>-----> MikeO
|
|
|
|
|
Here is an example of what a working email sub looks like:
Dim objMail As New System.Net.Mail.MailMessage
Dim ToAdd As New System.Net.Mail.MailAddress("to@email.com", "Recipient Name")
Dim FromAdd As New System.Net.Mail.MailAddress("from@email.COM", "Sender Name")
'The subject of the message
objMail.Subject = "Request for Mathching Funds Grant"
' The message text
objMail.Body = "Body Message Here"
objMail = New System.Net.Mail.MailMessage(FromAdd, ToAdd)
'Add a carbon copy recipient.
'MailAddress copy = new MailAddress("Notification_List@contoso.com");
'message.CC.Add(copy);
'Set up the client
Dim objClient As New System.Net.Mail.SmtpClient
objClient.Host = "smtp.host.com"
objClient.Send(objMail)
Sorry i'm too tired to dissect your code, but this code should get you on the right path
Nathan Lindley
.NET Aficionado
|
|
|
|
|
Thanks very much for your help.
I tried running your code with the relevent details changed; to/from addresses and the exchange server name(smtp.server.com).
However the code runs but no emails are received.
I have an exchange environment, and am new to programming, what can i do??
Cheers
Khurum
|
|
|
|
|
What I want to do is look at a file on a remote computer and get it's Product Version (not file version).
The code that I'm using to get this is:
productVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo("\\" & compName & "\C$\Progra~1\Mozill~1\firefox.exe").ProductVersion
This works fine if I'm logged in with my Domain Admin account. But I want to be logged in as a user instead of an admin. How do I send my Domain Admin credentials along with the file info request?
In this specific instance, the Product Version isn't located in the registry or (as far as I can tell) in anything that WMI can report. I know how to pass credentials when accessing remote WMIs, just not with file system requests.
Been stuck on this problem for over a week. Please help.
Thank you,
Chris
|
|
|
|
|
I am working on a Finger Print terminal's PC connectivity software. I am using an OCX provided by the hardware manufacturer. Till now I am able to connect to the device and read user IDs. But the problem is with reading finger print data from the device and converting it to bitmap or any other image format. Manufacturers have provided a sample application in Delphi. I am created the similar VB application by understanding its different function. A function in which the data is being read from the device is -
function TForm1.BackupFinger():integer;<br />
var<br />
bRet:boolean;<br />
iRet:integer;<br />
jh:integer;<br />
dwMachineNumber,dwEnrollNumber,dwEMachineNumber,dwBackupNumber:integer;<br />
d1,d3:longint;<br />
buf: array[0..800] of longint;<br />
m:TMemoryStream;<br />
begin<br />
jh := StrToInt(cbJh.Text);<br />
d1 := 0;<br />
d3 := 0;<br />
dwMachineNumber := jh;<br />
dwEnrollNumber := qfp.FieldByName('dwEnrollNumber').Value;<br />
dwEMachineNumber := qfp.FieldByName('dwEMachineNumber').Value;<br />
dwBackupNumber := qfp.FieldByName('dwBackupNumber').Value;<br />
bRet := FPKeeper1.GetEnrollDataB(dwMachineNumber,dwEnrollNumber,dwEMachineNumber,dwBackupNumber,d1,buf[0],d3);<br />
if bRet = true then<br />
begin<br />
m := TMemoryStream.Create;<br />
m.Position := 0;<br />
iRet := m.Write(buf,800);<br />
qfp.Edit();<br />
qfpdwEnrollData.LoadFromStream(m);<br />
qfp.FieldByName('dwPassWord').Value := d3;<br />
qfp.FieldByName('Memo').Value := 'Backuped';<br />
qfp.Post();<br />
m.Free;<br />
BackupFinger := 1;<br />
end<br />
else<br />
begin<br />
BackupFinger := 0;<br />
end<br />
end;
Its obvious that data is being read and stored in Access Database. Now, I don't know what type in VB I should create for TMemoryStream. Also any idea how to convert this data into any image format will be very helpful.
|
|
|
|
|
Hi,
Please how do set papersize irrespective of printer type.
And also I want to set the endof the document such that if a paper of double the papersize is set on the print 2 copies will printed on the paper.
When shld I use the Newpage method.
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|
|
Hi to all you coders out there
I'm relatively new to all this and I'm presently using Visual Studio 2005 with VB.NET and ASP.NET. I'm designign a web application using ASP.NET.
Hopefully what I'm asking is simple (just not to me!). I want some sample VB.NET code to print an exisintg document to a specific printer. I know this has changed alot from VB 6 which I had used before. In the example take the following parameters:
document name and path: C:\Upload\report.pdf
printer name: OfficeJet85
I really hope to hear from some of you! Thanks in advance!
Dave
|
|
|
|
|
I don't believe you can start a printer in ASP.NET, the user has to do it in the browser.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian
Thanks for your reply.
Can I do it using VB.NET?
Dave
|
|
|
|
|
If you're not using ASP.NET. The problem is that ASP.NET runs on the server and generates HTML for a browser. If you're writing a winforms app, then you're running on the machine you want to print on, that's fine. HEaps of tutorials on the web.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Guys,
Quick one (yeah I smell that too )
I got this pimped out treeview that handles drag'n'drop by itself etc.
It raises 'Before...' events during the d&d cycle because i want to be able to disallow some actions based on the node being affected.
This way I can have much cleaner code and all checks in the actual app will be kept to a minimum.
Now, the problem is that if i choose to cancel an action based on the data the 'Before' event passes to it's handler I need to do something like:
<br />
Sub ...(Node as TreeNode)... handles MyTreeview.BeforeNodeDrag<br />
<br />
if Node ...... then<br />
'I set a custom property of the treeview<br />
'the tree will check the .Allowdrag before it executes DoDragDrop<br />
MyTreeview.AllowDrag = False<br />
....<br />
end if<br />
<br />
end sub<br />
Once the control is passed back to the tree's d&d events drag will be terminated. This works fine and is rather clean too.
BUT
I want to know how I can pass a param back to the treeview with the one of the BeforeNodeDrag params.
For instance, If you look at the QueryCountinueDrag event in a treeview there e.Action can be set to Cancel and once the procedure is exited d&d is aborted.
Can this be done?
Thanking in advance
Regards
Alex
The perfect code is always in your head...it just a matter of how hard you bang your head against the wall to get it out!
|
|
|
|
|
Anyone?
The perfect code is always in your head...it just a matter of how hard you bang your head against the wall to get it out!
|
|
|
|
|
This can be done only if the control supports it. Since we nothing of the controls you're using (it's not Microsoft's) there's no way to tell if it does.
Basically, it would work just like, say, the Form's Closing event. There is a CancelEventArgs object that is sent to the event handler your write. If you want to cancel closing the form, you set its Cancel property to True sometime before control is passed back to the event source.
Private Sub Form1_Closing(sender As Object, e As CancelEventArgs) Handles MyBase.Closing
' Cancel the Closing event from closing the form...
e.Cancel = True
End Sub
You MAY be able to add this support if you create your own version of that treeview control and override the sub that raises this event, if there is one. You'd have to provide the new custom event code and the code to handle the parameter you want to pass. But it depends on the control and what you want to do with that data your passing back.
For example, in the Form class, there's a sub called OnLoad that raises the Load event that you handle in your code. You'd have to override the OnLoad sub if you wanted to do something different, like what you're talking about, passing a parameter back to the OnLoad sub.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
It's a pain but it seems like the right way to solve the issue.
Thanks a lot for the tip Dave
Regards
Alex
The perfect code is always in your head...it just a matter of how hard you bang your head against the wall to get it out!
|
|
|
|
|
Hi !!
I have a software developed using VB 6.0 and SQL server 2000.During the development stage we gave (hard coded) the server name as "SERVER1".But when I ran the same project on another m/c the DB doesn't get connected.The other m/c is having local SQL server.
What will be the problem.Whether I'll have to change the code or the SQL server settings or both.
Plz help me out.
Thanx & Regards.
Success is not a Destination,
... But a Journey !!
|
|
|
|