TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
guyjasper
NA
3
0
CCW + WCF problem
Jun 23 2010 6:08 PM
hi, please help me with my problem. basically i have a C# code for my web service, and a C# client that will consume the web service. both are working fine. the C# client has to be called by unmanaged code (VC 6.0) so i made a CCW for that. my C++ code can now call functions from my C# Client. the problem occurs when the unmanaged code calls a function from my C# client that in turn will call a function from the web service. i always get an Acess Denied error in my cpp code.
my C# client looks like this->
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IMediaControllerClient
{
[DispId(1)]
string ReserveItem(int StoreNo, int TerminalNo, int TransactionNo, string UPC);
}
[ClassInterface(ClassInterfaceType.None)]
[ProgId("MediaController.MediaControllerClient")]
public class MediaControllerClient : IMediaControllerClient
{
EndpointAddress m_adr;
string m_sEndPointName = "";
localhost.MediaControllerServiceClient proxy = null;
public MediaControllerClient()
{
//Note values from settings file
m_adr = new EndpointAddress("http://localhost:8081/MediaControllerService");
m_sEndPointName = "BasicHttpBinding_MediaControllerService";
//proxy = new localhost.MediaControllerServiceClient(m_sEndPointName, m_adr);
}
public string ReserveItem(int StoreNo, int TerminalNo, int TransactionNo, string UPC)
{
if(proxy==null)
proxy = new localhost.MediaControllerServiceClient(m_sEndPointName, m_adr);
localhost.MediaControllerServiceClient proxy = new localhost.MediaControllerServiceClient();
try
{
return proxy.ReserveItem(StoreNo, TerminalNo, TransactionNo, UPC);
}
catch (EndpointNotFoundException ex)
{
return "<Error>";
}
}
Reply
Answers (
1
)
Uploading images in C#
how to create table in database using c# and table should be created with columns of EXCELWORKBOOK