Click here to Skip to main content
15,914,323 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Error "Record(s) cannot be read; no read permission on 'table's name' " when Connect Access 2.0 (.mdb) file in Net ? Pin
Dave Kreskowiak10-Apr-09 2:28
mveDave Kreskowiak10-Apr-09 2:28 
GeneralRe: Error "Record(s) cannot be read; no read permission on 'table's name' " when Connect Access 2.0 (.mdb) file in Net ? Pin
Doan Quynh11-Apr-09 18:34
Doan Quynh11-Apr-09 18:34 
GeneralRe: Error "Record(s) cannot be read; no read permission on 'table's name' " when Connect Access 2.0 (.mdb) file in Net ? Pin
Dave Kreskowiak11-Apr-09 18:40
mveDave Kreskowiak11-Apr-09 18:40 
GeneralRe: Error "Record(s) cannot be read; no read permission on 'table's name' " when Connect Access 2.0 (.mdb) file in Net ? Pin
Doan Quynh12-Apr-09 15:13
Doan Quynh12-Apr-09 15:13 
QuestionRetrieving the COM class factory for component with CLSID {83F04DB3-9710-11D5-87F6-005004FEB4BD} failed due to the following error: 800703e6. Pin
Renukapadhamanaban8-Apr-09 19:03
Renukapadhamanaban8-Apr-09 19:03 
QuestionWeb Service for Playing Media Player Pin
lynn10077-Apr-09 22:40
lynn10077-Apr-09 22:40 
AnswerRe: Web Service for Playing Media Player Pin
Dave Kreskowiak8-Apr-09 7:42
mveDave Kreskowiak8-Apr-09 7:42 
GeneralRe: Web Service for Playing Media Player Pin
lynn10078-Apr-09 15:15
lynn10078-Apr-09 15:15 
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!
GeneralRe: Web Service for Playing Media Player Pin
Dave Kreskowiak8-Apr-09 17:40
mveDave Kreskowiak8-Apr-09 17:40 
GeneralRe: Web Service for Playing Media Player Pin
lynn10078-Apr-09 18:42
lynn10078-Apr-09 18:42 
GeneralRe: Web Service for Playing Media Player Pin
Dave Kreskowiak9-Apr-09 4:08
mveDave Kreskowiak9-Apr-09 4:08 
GeneralRe: Web Service for Playing Media Player Pin
lynn10079-Apr-09 16:17
lynn10079-Apr-09 16:17 
GeneralRe: Web Service for Playing Media Player Pin
dojohansen9-Apr-09 4:30
dojohansen9-Apr-09 4:30 
GeneralRe: Web Service for Playing Media Player Pin
lynn10079-Apr-09 16:34
lynn10079-Apr-09 16:34 
QuestionFaulting applicationon windows 2k3 server Pin
Vikas Salvi7-Apr-09 22:38
Vikas Salvi7-Apr-09 22:38 
QuestionBookMarks in webbrowser Pin
britishcolumbia7-Apr-09 18:35
britishcolumbia7-Apr-09 18:35 
AnswerRe: BookMarks in webbrowser Pin
Dave Kreskowiak8-Apr-09 1:28
mveDave Kreskowiak8-Apr-09 1:28 
GeneralRe: BookMarks in webbrowser Pin
britishcolumbia8-Apr-09 13:03
britishcolumbia8-Apr-09 13:03 
GeneralRe: BookMarks in webbrowser Pin
Luc Pattyn8-Apr-09 13:18
sitebuilderLuc Pattyn8-Apr-09 13:18 
GeneralRe: BookMarks in webbrowser Pin
britishcolumbia8-Apr-09 16:57
britishcolumbia8-Apr-09 16:57 
GeneralRe: BookMarks in webbrowser Pin
dojohansen9-Apr-09 4:48
dojohansen9-Apr-09 4:48 
GeneralRe: BookMarks in webbrowser Pin
Dave Kreskowiak8-Apr-09 13:29
mveDave Kreskowiak8-Apr-09 13:29 
QuestionCommand prompt from windows application... Pin
RA|-|UL PATEL6-Apr-09 20:35
RA|-|UL PATEL6-Apr-09 20:35 
AnswerRe: Command prompt from windows application... Pin
Alan N6-Apr-09 23:36
Alan N6-Apr-09 23:36 
AnswerRe: Command prompt from windows application... Pin
i gr814-Apr-09 2:32
i gr814-Apr-09 2:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.