|
Was IIS installed AFTER Visual Studio?? IIS has to be installed first.
You might want to look at this post[^].
-- modified at 15:13 Tuesday 27th November, 2007
|
|
|
|
|
Ah, so!
I will try the fix in your reference.
Thanx!
|
|
|
|
|
I performed the suggested ritual. VS still won't activate the OK button for anything but a File System location.
Any other suggestions?
|
|
|
|
|
Reinstall Visual Studio (do NOT repair the installation!). Uninstall VS and reinstall it with IIS already installed.
|
|
|
|
|
I was afraid it was coming to that. Sigh.
|
|
|
|
|
I've done it more times than I care to count, so I feel your pain.
VS2008 takes even longer...
|
|
|
|
|
VS2008 takes even longer...
Now that's something to look forward to!
|
|
|
|
|
Firstly sorry, I am new to vb.net.
I am writing a vb.net application to manage reports on a reporting services server. The application allows users to create datasources, upload reports from rdl files etc.
The app uploads reports ok and creates datasources but when I try to run one of the reports I get "The report server cannot process the report. The data source connection information has been deleted. (rsInvalidDataSourceReference)"
If I manually set the datasource to the shared datasource on the report server the report works fine.
From searching around I think I need to re-point the datasource in the report but I cannot figure out how to do this. I have tried using SetItemDatasource but when I try to enter the name of the datasource I get a "Type String cannot be converted to a 1 dimensional array of type datasource."
I am sure I should be doing something like:
SetItemDataSources("/ReportsFolder/ReportName", SharedDataSource)
but I cannot figure out what the SharedDataSource reference should be, I have tried "myDataSourceFolder/MyDataSourcename" but I get the above error. Please somebody put me out of my misery.
Thanks.
Richard
Its better to burn out than to fade away!
|
|
|
|
|
Realsirocco wrote: but I cannot figure out what the SharedDataSource reference should be
Did you try reading the documentation[^]?
It states that the 2nd argument is an array of DataSource[^] objects.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
This is one of my first real tasks in VB 2005 (I'm returning to VB programming after years away).In some dialogs in an app, I want to let the user display an appropriate topic in an "HTML Help" help file. (I'll add a help button to the form so that users can tell which dialogs have context-senstitive help.
I can do this with something like:
Help.ShowHelp(Me, "C:\junk\foo.chm", HelpNavigator.Topic, "Making_a_widget.htm")
where C:\junk\foo.chm is the compiled help file and Making_a_widget.htm is the name of the topic file in the source.
This is all straightforward enough but it's a one-way street - I have to be confident that my topic is there. As far as I can tell, there is no way I can check whether the topic I want is still in the help file - if I garble the topic filename like this:
Help.ShowHelp(Me, "C:\junk\foo.chm", HelpNavigator.Topic, "Waking_a_midget.htm")
the help window just shows a "404" page where the topic would have appeared. Is there any way of checking from VB whether a help topic is present (or getting a help file error status), so that I can put something in my app's error logging file?
|
|
|
|
|
The Help class doesn't expose any method to do this. I'm not aware of any Win32 API call that can do this either.
|
|
|
|
|
We have a macro that creates VB.Net classes and setup pages from system specifications.
We are moving to VB.Net 2008 and are having a problem - the macro is now crashing at random times with InvalidCastException - Unable to cast a ComObject to EnvDTE._DTE on the line
DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Activate().
Placing a breakpoint on this line and watching the DTE shows its entries as {System._ComObject}. Sooner or later, those entries change to {System.Runtime.Interop.COMException} and the macro crashes.
If data entry is delayed by a coffee break, the crash will happen on the next entry.
Any ideas of what's going on? Is the garbage collector removing the DTE definition? How can I prevent this?
-- modified at 15:12 Wednesday 28th November, 2007
|
|
|
|
|
I copied this code exactly from the msdn site:
http://msdn2.microsoft.com/en-us/library/system.marshalbyrefobject.aspx[^]
However, it does not run for me. What am I missing? Thanks
Imports System
Imports System.Reflection
Public Class Worker
Inherits MarshalByRefObject
Public Sub PrintDomain()
Console.WriteLine("Object is executing in AppDomain ""{0}""", _
AppDomain.CurrentDomain.FriendlyName)
End Sub
End Class
Class Example
Public Shared Sub Main()
' Create an ordinary instance in the current AppDomain
Dim localWorker As New Worker()
localWorker.PrintDomain()
' Create a new application domain, create an instance
' of Worker in the application domain, and execute code
' there.
Dim ad As AppDomain = AppDomain.CreateDomain("New domain")
Dim remoteWorker As Worker = CType( _
ad.CreateInstanceAndUnwrap( _
[Assembly].GetExecutingAssembly().FullName, _
"Worker"), _
Worker)
remoteWorker.PrintDomain()
End Sub
End Class
|
|
|
|
|
sorry, to be clear it's the createinstanceandunwrap line that produce the error:
cstrader232 wrote: ad.CreateInstanceAndUnwrap( _
[Assembly].GetExecutingAssembly().FullName, _
"Worker"), _
Worker)
Could not load type 'Worker' from assembly 'WindowsApplication4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
|
|
|
|
|
Are you using VB.2008?? The page you linked to in the .NET 3.0 version.
YOu may be looking for this[^] page instead. Keep an eye on the version of the page you're looking at in the upper right corner of the content page. It'll say which version of the .NET Framework that page applies to, and give you links to other versions of the same page.
|
|
|
|
|
OK, thanks. Not yet for vb2008 for me; is it available already?
Anything that will help me get through this MarshalbyRefObject headache will be useful. I simply can't crack it.
|
|
|
|
|
VS2008 is availabe for download to MSDN subscribers. It's not out on CD/DVD yet, though it's been sent out to manufacturing.
You're using code from the .NET 3.0 version of that page. Like I said, use the code from the .NET 2.0 version of the page and you should have no problem.
|
|
|
|
|
I think I'm not a subscriber. I have a msdn password, but I don't think that's enough. Guess I'll have to wait.
|
|
|
|
|
I tried the code on the .NET 2.0 version of the page and it worked perfectly. The .NET 3.0 version doesn't work under VB.NET 2005.
|
|
|
|
|
how to know which procces['s] have access to a file in vb.net?
thnx
|
|
|
|
|
There are no classes or methods in the .NET Framework that will tell you this. This requires knowledge of calling Win32 API functions and how Windows internals work.
|
|
|
|
|
I am trying to load an application into a new domain. I have this c# code that runs fine:
AppDomain newDomain = AppDomain.CreateDomain("newDomain");
FileStream fs = new FileStream("c:\\TestClass.dll", FileMode.Open);
byte[] rawAssembly = new byte[(int)fs.Length];
Console.Write(fs.Length);
fs.Read(rawAssembly, 0, rawAssembly.Length);
Assembly asm = newDomain.Load(rawAssembly, null);
However the translation into vb.net does not:
Dim newDomain As AppDomain = AppDomain.CreateDomain("newDomain")
Dim fs As FileStream = New FileStream("c:\\TestClass.dll", FileMode.Open)
Dim rawAssembly() As Byte = New Byte((CType(fs.Length, Integer)) - 1) {}
fs.Read(rawAssembly, 0, rawAssembly.Length)
Dim asm As Assembly = newDomain.Load(rawAssembly, Nothing)
produces this error on the final line:
Could not load file or assembly 'TestClass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Both versions read the same number of bytes into the filestream.
thanks
|
|
|
|
|
I would have thought the error message made the problem quite clear.
cstrader232 wrote: Dim fs As FileStream = New FileStream("c:\\TestClass.dll", FileMode.Open)
Take out the second backslash in the filepath. In C#, two backslashes are treated as one in the final string. In VB, it's still two backslashes. This is because C# uses "\" as an escape character, whereas VB doesn't.
The declarion of the rawAssembly byte array could also be simplified.
' Beware! The CType call is a truncating conversion.
' Using this technique blindly, wihtout checking the source
' value for fit inside the targets bounds can result in a
' hard to find bug in your code!
Dim rawAssembly(CType(fs.length, Integer) - 1) As Byte
|
|
|
|
|
Thanks Dave, but that isn't the problem
I fixed the double slash to single slash, and rewrote the dim of the assembly().
The stream seems to be read OK at 3200 bytes
newdomain.Load still creates an error however.
Thanks
Dim newDomain As AppDomain = AppDomain.CreateDomain("newDomain")
Dim fs As FileStream = New FileStream("c:\TestClass.dll", FileMode.Open)
Dim rawAssembly(CType(fs.Length, Integer) - 1) As Byte
fs.Read(rawAssembly, 0, fs.Length)
Console.WriteLine(fs.Length)
Dim asm As Assembly
asm = newDomain.Load(rawAssembly, Nothing)
|
|
|
|
|
Where did this code come from? Did it come from an MSDN page? Were you looking at the correct version of the page??
Is TestClass.dll a .NET assembly that you compiled, or a DLL file you copied from somewhere else?
|
|
|
|