|
OK, is there a table in that database called "TABLE_NAME"??
|
|
|
|
|
No, it's common name for all table in this database
QuynhTD
|
|
|
|
|
Hi,
I am not sure that I am posting this to the right forum category. Please advice me if I am in wrong direction.
My application has been migrated from .Net1.1 to .Net2.0 and now I am working on Vistual Studio 2008 and compiled the application to targetting the .Net framework 2.0. This works very fine in the local server. When I deployed the application in the client place it was throwing error when accessing third party com objects. I found that the Server was Microsoft Windows Server 2003 SP2 -64 bit and this is the reason for the error(found the solution in forums). So in the IIS server I added ASP .NET 2.0.50272 (for 32 bit) through the web server extension. Now I can able to run the application and access the com objects. It is running alright for few minutes and it is throwing the error
Retrieving the COM class factory for component with CLSID {83F04DB3-9710-11D5-87F6-005004FEB4BD} failed due to the following error: 800703e6.
If I stop the application pool and the web site and then restart them everything works fine withut any issue for again few more minutes. I searched the forums but it is all confusing. Can any one please help me to come out of this blue?
PS: I found some reference to DEP in the community forums but I am not sure I fall under those category to do disable it. I am bit afraid of play with registries, since it is client's shared server with other applications running.
Please...please... any sort of help will be really appreciated. Thanks in advance.
Cheers
Renu
|
|
|
|
|
Hi,
I'm trying to make a webservice in C#, that plays movie or music. But I've tried many times for attempting to realize this function, but just can't figure it out. I know how to add references of this activex control, but I haven't found a way to use it.
The main problem is that I don't know how to use the activex control with an interface.
Can someone help me or give me an example? Thanks!
|
|
|
|
|
So, you're trying to use the media player in a Web Service project?? I hope you realize that web services don't have a user interface, and hence, you wouldn't be able to see anything that a user interface component displays.
What are you ultimately trying to do with this web service?
|
|
|
|
|
Thank you!
Actually, The reason I want to use the activex control with an interface in webservice is that I'm trying to wrap this control with webservice, and webservice has many advantages.
Instead of using it directly, I wander if there is an indirect way of using this kind of activex control.
I've tried one way, but it didn't work. Then I think I've used this control in a wrong way.
Here are main steps:
1. I create a class library project with C#, and add a user control.
2. After I add the reference of the activex control , I can place the control on the user interface.
3. I write some functions of the control and register for COM interop on the page of its property.
4. I use the .dll file it generates in a website, and it works fine. Then I wonder if I can use it in the webservice as well, so I add the reference of the .dll generated by the project in the web service project.
5. I use it in the webservice like this:
[WebMethod]
public void ShowCamera1(String ipText)
{
using (test2.Camera2 ec = new test2.Camera2())
{
ec.ShowCamera(ipText);
}
} but when I debug it,it genetates an error .
"System.Threading.ThreadStateException: ActiveX control '745395c8-d0e1-4227-8586-624ca9a10a8d' cannot be instantiated because the current thread is not in a single-threaded apartment.
at System.Windows.Forms.AxHost..ctor(String clsid, Int32 flags)
at System.Windows.Forms.AxHost..ctor(String clsid)
at AxAXISMEDIACONTROLLib.AxAxisMediaControl..ctor()
at test2.Camera2.InitializeComponent() in D:\lynn\class\HelloWord\test2\Camera2.Designer.cs:line 32
at test2.Camera2..ctor() in D:\lynn\class\HelloWord\test2\Camera2.cs:line 31
at Service.ShowCamera1(String ipText) in c:\Inetpub\wwwroot\AXIS_webservice\App_Code\Service.cs:line 36"
Perhaps I have used the activex control in a wrong way, but I really want to try to find a way of using this control in webservice. Any suggestion is helpful to me, thank you!
|
|
|
|
|
lynn1007 wrote: I'm trying to wrap this control with webservice, and webservice has many advantages.
You really don't have a clue what a web service is do you?? You've been told, how many times now?, that a web service has no user interface, and as such, you cannot use visual controls on it. There is no point in putting a player in a web service. AT BEST, it'll play whatever on the web server, and only briefly if at all, and not play at all on the client browser side.
IT WILL NOT WORK!! YOU CANNOT USE THESE CONTROLS IN A WEB SERVICE PROJECT!!
|
|
|
|
|
Thanks!
This means that I do not need to spend any more time trying to use the control in web service project. You really do me a big favor. Thank you so much.
I have tried to work this problem, though it didn't and won't come out anything, at least I understood something.
Another question, does it mean that webservice cannot replace activex control totally?
|
|
|
|
|
lynn1007 wrote: does it mean that webservice cannot replace activex control totally?
They are two completely different technologies that have nothing to do with each other. Web Services were never meant to replace ActiveX controls.
|
|
|
|
|
Thank you!
Perhaps I've misuderstood somewhere. I have to read more books.
|
|
|
|
|
It's not the fact that it's a web service that means you cannot do it this way - at least not that alone. Consider the arcitechture of *any* client-server system and you will see (I hope) why it cannot work.
There is a server computer and a client computer. Programs are running in both places, and they have different roles. The client is a program that sends messages we call "requests" to the server program, and the server is a program that accepts such requests and sends a message back called a "response". In other words, from the client's point of view a server cannot provide anything but these messages.
In principle, it would be possible to have a server that responded to a message by sending both *data* and *code* to the client. The code could be precompiled, or it could be text that the client compiles when it receives it. But obviously such a solution would be problematic. It would be potentially very dangerous, unless the client can have absolutely total confidence that it's not possible for anyone to intercept the communication and send evil messages full of virus code.
So basically if you succeeded in running the media player in your service it wouldn't result in anything playing at the client. The usual way of doing this is instead to run the media player on the client side, usually embedded in a web page, and just send video data from the server.
You can google for articles about how to do this, but to be honest I think you should take some time to do simpler stuff first to get a good grasp of the basics as video streaming is a fairly advanced concept.
|
|
|
|
|
Thank you for your reply.
Your reply gives me some hope. That's very kind. I'll keep an eye on the articles about this stuff.
|
|
|
|
|
We are running a .Net 2.0 application on a Windows 2003 server machine with service pack 1.
But the application crashes frequently (say once every 15 min), and following message is logged in event viewer - "Faulting application <app name="">, faulting module mscorwks.dll"
we hv also tried to install the patch from the following link
http://support.microsoft.com/kb/913384[^]
But the problem persists..
Any help on this issue will be highly appreciated.
Thanks in advance
Vikas Salvi
Programmer Analyst
|
|
|
|
|
Im creating a web browser for a friend, and one of his requests is that I should have favourites/bookmarks built in. Im trying to do this by reading and writing to a text file. Can anyone fix my mistakes? This doesnt work at all.
'To load the favourites on startup:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For Each item As String In "C:/Program Files/Testfile.txt"
ComboBox1.Items.Add(item)
Next
End Sub
'To add the content of a textbox to your favourites
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
texty.Text = WebBrowser1.Url.ToString()
'If My.Settings.Favourites.Contains(texty.Text) Then
' MessageBox.Show("It has been in your favourites!")
'Else
'
ComboBox1.Items.Add(texty.Text)
Dim objStreamWriter As StreamWriter
'Pass the file path and the file name to the StreamWriter constructor.
objStreamWriter = New StreamWriter("C:\Program Files\Testfile.txt")
'Write a line of text.
objStreamWriter.WriteLine(texty.Text)
'Close the file.
objStreamWriter.Close()
'End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
WebBrowser1.Navigate(ComboBox1.Text)
End Sub
|
|
|
|
|
britishcolumbia wrote: For Each item As String In "C:/Program Files/Testfile.txt"
You really need to pickup a beginners book on VB.NET and work through it. Just specifying a string in a For Each doesn't automatically assume that string is a file path and open it for reading.
britishcolumbia wrote: Im creating a web browser for a friend
So, why doesn't your friend get a hold of IE8 or FireFox and have a working web browser now, instead of waiting for a couple of months for you to figure out how to write one?? After all, your obviously just wrapping the built-in WebBrowser component, which is just IE anyway.
Seriously, your code is so bad that I don't consider it fixable. I'd scrap it and rewrite it from scratch, using XML to store the Favorites instead of a straight text file.
|
|
|
|
|
Please keep your comments to your self if you don't plan to help anyone.
Everyone starts somwhere, I start here.
If you’re the Microsoft MVP, you most likley know how to fix this. If you would like, without criticizing me, please help me out. If not, good day to you.
|
|
|
|
|
Do you really expect people to spend time and help you with your attitude?
Be smart and recognize good advice when it is offered.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Allright, well I'm going to close this post, Im just used to other forums where that would have been considered "Bad help" but I'm new here, so I suppose things work a little differently.
I guess I took the previous post the wrong way, I thought that saying that the code was so bad that I should just re-write it, and then saying that the whole project was nutty, or worthless as I took it. I don't really see that too much outside of YouTube commenting, and thought it was a bit rude.
I was just looking for a bit of advice. That’s for whatever you gave me, even if I didn’t see it.
|
|
|
|
|
I'd agree with you actually, he was a bit rude. But he is also right! You do need to learn the basic concepts, and while you're welcome to make your own IE-based web browser (the web browser component is full of IE code as far as I understand) it probably isn't the best way to learn.
If you really want advice, as opposed to code that loads/saves bookmarks, then none can be better than getting a good introductory programming book. There's no shame in being a beginner, but it's smart to realize that you are one and work from that assumption.
Personally I'd advice you to go with C# instead of VB.NET though. Let me be clear about this right away: C# and VB.NET will both allow you to do the same, and you'll achieve the same performance (or lack thereof, depending on your code) no matter which one you use. However, a lot of VB.NET coders have come to the .net platform from lesser programming tools (in my opinion) such as VB6, Access, and probably a few people who have just written a few macros in Excel (VBA), while a lot of C/C++/java coders have picked up C#. This might upset some people, but in my opinion there is little doubt that the C# community is of higher average quality than the VB.NET one. There are awful and great programmers in both camps of course, but if I were you I'd choose to associate with the C# lot.
VB.NET on the other hand might be preferable in some ways. It has optional parameters, which is in fact useful if you do Microsoft Office programming (lots of methods with 30 parameters - it's the one thing I will use VB.NET for if free to choose). And the Visual Studio tools are sometimes more refined for VB, presumably because MS feels it's necessary to nanny VB.NET users a bit more. For example, the code snippets that ship with VS include lots of VB stuff and little C# stuff.
My two cents.
|
|
|
|
|
britishcolumbia wrote: you most likley know how to fix this
Yes, and I already told you how. I would scrap the whole thing and start over with an XML storage format.
Seriously, even the basics of VB.NET is beyond you right now. How successful do you think your going to be if you don't understand the simple concepts of loops and enumerations?? Get a book on VB.NET and start teaching yourself the basics. I'm not trying to insult you, but just trying to prevent frustration and a lot of wasted time posting question on forums and waiting hours/days for answers to questions that you wouldn't even have to ask in the first place if you understood the basics of how VB.NET works and how it relates to the .NET Framework.
britishcolumbia wrote: If you would like, without criticizing me, please help me out.
Excuse me if I questiond the whole point of writing your "own" web browser for your friend. The whole concept of him/her waiting for you to write a browser is a bit nutty.
|
|
|
|
|
Hello Friends..
I want to call Shell from my vb.net windows application and run the command.
I have tried like
"Process.Start("cmd.exe", "cd\")"
But it just open command prompt.Does not run the command which passed by argument. That is "Cd\".
How can i do that...????
Thanks in advance.
|
|
|
|
|
|
Create a bacth file of ur command and execute it.
|
|
|
|
|
I cannot run any dotnet executable if the path including the name of the exe exceeds 128 characters.
The executable does appear for a split second and disappears immediately.
There is nothing in the event log.
I'm running Windows XP SP3, and .NET framework 2 SP1.
Any help is appreciated.
Thank you,
Michel
|
|
|
|
|
msmits wrote: The executable does appear for a split second and disappears immediately.
In that case, you've got some debugging to do. Since the code runs and shows a window, albeit briefly, it means your code IS running. So, the problem would have to be in your code somewhere. Is your code using files somewhere?? Is it handling the path names with spaces properly??
|
|
|
|
|