|
|
WhiteSky wrote:
Whats matter?
Nothing
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
We have got stuck in our development of a web service client with wse 2.0 sp3.
Its a secure webservice over ssl with WS-Trust and WS-Security.
We get SecurityException: WSE537 and cant get past this.
Have searched the all over the web but cant find anyone with a similar issue.
When we send a RequestSecurityToken this error message shows in the console:
(partly in swedish)
Ohanterat undantag: Microsoft.Web.Services2.Security.SecurityFault: The
security
token could not be authenticated or authorized --->
System.Security.SecurityExc
eption: WSE537: The certificate's trust chain could not be verified with the
fol
lowing reason: Ett nödvändigt certifikat är inte inom sin giltighetstid när
det
verifieras mot den aktuella systemklockan eller tidsstämpeln i den signerade
fil
en.
.
at Microsoft.Web.Services2.Security.X509.X509CertificateChain.Verify()
at Microsoft.Web.Services2.Security.Tokens.X509SecurityToken.VerifyTrust()
at Microsoft.Web.Services2.Security.Tokens.X509SecurityToken.Verify()
at
Microsoft.Web.Services2.Security.Tokens.X509SecurityTokenManager.VerifyTok
en(SecurityToken securityToken)
at
Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadBinarySec
urityToken(XmlElement element)
--- Slut på stackspårning för interna undantag ---
at
Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadBinarySec
urityToken(XmlElement element)
at
Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.GetTokenFromX
ml(XmlElement element)
at Microsoft.Web.Services2.Security.Security.LoadToken(XmlElement
element, Se
curityConfiguration configuration, Int32& tokenCount)
at Microsoft.Web.Services2.Security.Security.LoadXml(XmlElement element)
at
Microsoft.Web.Services2.Security.SecurityInputFilter.ProcessMessage(SoapEn
velope envelope)
at Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope
envelope
)
at
Microsoft.Web.Services2.Messaging.SoapClient.SendRequestResponse(String me
thodname, SoapEnvelope envelope)
at
Microsoft.Web.Services2.Security.SecurityTokenServiceClient.RequestSecurit
yToken(SecurityTokenMessage request, String methodName)
at
Microsoft.Web.Services2.Security.SecurityTokenServiceClient.IssueSecurityT
oken(RequestSecurityToken request)
The swedish error message is in english(with kinda bad translation)
A necessary certifikate is not in valid when verified against the actual
systemtime or the timestamp in the signed file.
Dunno wich certificate they mean... all we are using are valid?
Anyone who is able to push us in the right direction?
//Ken Q
|
|
|
|
|
here is my code btw:
SecurityTokenServiceClient *client = new SecurityTokenServiceClient(new Uri("https://bglinkt1.bgc.se/BGC.BankgiroLink.WebService/CustomSecurityContextTokenHandler.ashx"));
RequestSecurityToken *rst = new RequestSecurityToken("http://schemas.xmlsoap.org/ws/2004/04/security/sc/sct");
rst->RequestTypeUri = "http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue";
RequestSecurityTokenResponse *response;
response = client->IssueSecurityToken(rst);
return response;
//Ken Q
-- modified at 9:01 Friday 21st July, 2006
|
|
|
|
|
Hi,
I have dll which is loaded using LoadLibrary and freed using FreeLibrary. The functionality of dll is to send a https request to a server and get the response. I am using wininet library for sending and receiving http data.
my sequence of wininet api functions are
InternetOpen
InternetConnect
HttpOpenRequest
HttpSendRequest
InternetReadFile
I closed all the handles corresponding to above.
any suggestions.
thanks
|
|
|
|
|
gbabu17 wrote: FreeLibrary takes much time(45 sec) to free a Win32 dll
We can't comment on any custom dll without seeing actually, what is coding has been done in that particular dll!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi alok,
Ya i know it is difficult to suggest without seeing the code. I have tried to debug the dll in all possible ways and i found that if i do not send the request i dll is freed normally, but if i use the wininet api for sending the requests and getting response it is taking much time to free the library. i mean to ask wininet.lib internally takes much time to get freed.
thanks
|
|
|
|
|
gbabu17 wrote: i mean to ask wininet.lib internally takes much time to get freed.
WinInet api are very heavy!.. might be its closing net/Socket connection that might be taking time to unload!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi,
so is there some way to trace them, which is taking time to unload.
|
|
|
|
|
gbabu17 wrote: so is there some way to trace them, which is taking time to unload.
use profilers
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
i have a problem on merging 2 lists with 5 inputs on each list. the five inputs were already sorted and i'm trying to have a function to merge it. this is my defining function:
void merge(numA[],numB[],numAB[])
{
}
how can i merge the inputs in numA[] and numB[] and put them in the array of numAB[]?
|
|
|
|
|
Those are arrays, not lists. If you used std::list, or std::vector, you could merge them trivially. As it stands, you need to return numAB, create it to be the size you need, and write two loops ( or two memcpy statements would be more efficient ) to copy them where you want them.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
not insane yet! wrote: how can i merge the inputs in numA[] and numB[] and put them in the array of numAB[]?
I believe you should read about Merge Sort![^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Try this:
---------
#include <algorithm>
#include <iostream>
#include <iterator>
void Merge(const int (&a)[5], const int (&b)[5], int (&ab)[10])
{
std::merge(a, a+5, b, b+5, ab);
}
int main(int argc, char* argv[])
{
int a[] = {1, 3, 5, 7, 9};
int b[] = {2, 4, 6, 8, 9};
int c[10];
Merge(a, b, c);
std::copy(c, c+10, std::ostream_iterator<int>(std::cout, " "));
std::cout << std::endl;
return 0;
}
Steve
|
|
|
|
|
Did you solve the problem?
Steve
|
|
|
|
|
I have a program that works just fine if I run it in Debug mode and set up a break point at a specific line. If i run it normaly it doesn't work, Beacuse it skips to fast that part of the program. Now here i am asking you, how can i stop the execution for let me say 3 seconds? Thanks
|
|
|
|
|
You can stop the program, but really you need to fix your design. Why is it 'too fast' ? You've not described what it does. If you want to stop for the user to read something, don't select an arbitrary time, show it in a message box that they can close whenever they want.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
The program reads a string from the COM port and then enters it in a database. Because the system reads the port to fast and then tryes to enter the string to the database, i only get the first char of the string in the database.
|
|
|
|
|
tanarnelinistit wrote: he program reads a string from the COM port and then enters it in a database.
hows your program read string from COM port... as you can read only a byte at time from comport!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Then you need to come up with a way to know that all the string has come through - is it null terminated ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
What is problem exactly ??
Are u getting the complete data through the port ??
Give us some more details..
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Ok I'm using a code posted on this side under C++ serial class, I read from the port 16 bytes and i want to write them in the database, i got the string into the database but i seem to get some nasty results too. I should get smth like "FFFF00000000028C" but there are times when i get " FFF00000000028".
|
|
|
|
|
I think you could get more help if you were questioning your design instead of asking for a direct solution.
Anyway, concerning your original question, you can make a program slower by calling ::Sleep(milliseconds). If you wait for 10ms or 20ms you can check the port again to see if you received more data. To wait 3 seconds you would call ::Sleep(3000).
Under Windows 95/98/Me the smallest time that actually has a wait effect is 50ms, on NT/2K/XP you can use 10ms as the smallest wait time.
Anyway, it seems to me that a good design would be better than using ::Sleep() to solve a timing problem.
I hope this helps,
Rilhas
-- modified at 18:10 Friday 21st July, 2006
|
|
|
|
|
hi ,
Here is one trouble I met in my MDI program.
Worker thread is responsible for data collection from other source continuously. I defined one variable varData to contain the coming data. And notice main thread by customized message.
Main thread (CMainFrame/Views) is responsible to update the views to reflect the new value of varData.
I have used one critical section to control the writing to varData in worker thread. Yes. I have to do it. Here my concern is that whether it is necessary/must for me to use same critical section in views of MDI to control reading varData.
in My MDI, so many views are open, if CS is used ,I'm afraid the performance of my prgram will regress greatly.
pls Experts give your suggestion.
Appreciate for your help!
Sm
|
|
|
|
|
Yes it is. The CS will mean that only one thread can use the resource guarded by it. However, if the data structure is anything but an atomic data type there is the possibility of reading an incomplete (ie corrupt) update.
One way many applications avoid this is by having a queue of allocated changes. The writer gets the CS, allocs a change item, and appends to the queue, releases the CS, then signals a reader (shouldn't normally be more than one).
Reader gets the CS, pulls the queued item, and releases the CS. Uses the queued item to update a snapshot of the data, and deallocs the item. It then calls updateallviews (in MFC apps)
In your design, you are ensuring that the writing of data is serialised; in most cases, reading needs to be the same. I have seen a number of instances where all iterating over a collection needed to be guarded by a sync object as did all writes/erases; the original developer didn't understand that the collection was not thread safe in the sense that modifying while reading was a bad thing to do.
Steve S
Developer for hire
|
|
|
|