|
Even comprimising your SQL Server system would not yield the password if using a digest algorithm like MD5 or SHA1 without using a brute force attack. You make a good point about avoid such an attack, though.
Encrypting the ticket is definitely a good idea. Take a look at my article Role-based Security with Forms Authentication[^] for a brief mention of using FormsAuthentication.Encrypt to encrypt a forms authentication-based ticket. Doing this manually would work as well, but I thought I'd just mention it.
As far as using a salted hash, storing the salt makes your system little more secure than the first method of using an unsalted hash. If a cracker comprimised your system, nothing is stopping them from discovering the hash. The MD5-digest authentication mechanisms that many HTTP daemons support - as well as many browsers - actually generate a salt of sorts that it communicates with the browser (handshaking) and they use that to digest the credentials. Unfortunately, you can't do that because you need your salt to be persistent.
So, instead of storing the salt in the SQL Server, what about storing it in a different medium? You could, for example, keep an XML document (or even a simple text file) up-to-date with users and salts and read that into memory (use ASP.NET's Cache - if applicable - for some good event-based page validation). If a user comprimised the SQL Server, that cracker would have to comprise the entire system as well so that they could - most likely - gain debugging rights in order to insert their code into the ASP.NET worker process space and read the memory directly. This is just an example off the top of my head, but conceptually something you might want to consider.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
there is a xml file: price.xml
<price>
<comdt>
<Tname id=0>AAA</Tname>
<Tprice>0</Tprice>
</comdt>
<comdt>
<Tname id=1>BBB</Tname>
<Tprice>0</Tprice>
</comdt>
</price>
the price is null,
now I have a array,arrprice(i),
arrprice(0) is AAA's price,
arrprice(1) is BBB's price,
How to use the arrprice(i) update the xml file?
I tried this way,
For x = 0 To 1
Set objprice = objDom.SelectSingleNode("//price/comdt"&[x]&"/Tprice")
objprice.Text = arrprice(x)
but it doesn't work.
Thank you!
|
|
|
|
|
nichen1001 wrote:
How to use the arrprice(i) update the xml file?
You may find more help in either the VB/VB.NET forum or the XML/XSL forum as you are posting VB.NET code in the C# forum. That said, assuming you have an XmlNode representing the head of your document you can use the XmlDocument object to create a new element and then call the AppendChild method to add that entry to your document. If you want to delete an item, such as with your SelectSingleNode method above (I am assuming objprice is an XmlNode or XmlElement ), you can then call the RemoveChild method of the root element. Don't forget to save the document so all changes are reflected in the file. Hope this helps.
- Nick Parker My Blog
|
|
|
|
|
I was wonder if any of you miss the old #define
It was great having a preprocesser sometimes, but I guess it has its own bad side when developers overuse it and create a mess.
|
|
|
|
|
Not really... Why not read this article on C# Preprocessor Directives[^]???
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
>> Unlike C and C++ directives, you cannot use these directives to create macros.
|
|
|
|
|
Well.... Okay.... It is not as feature-rich as the C++ preprocessor but at least there is some functionality (I would have been really irked if the conditional compilation was not available)
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
C++? C for sure. Especially when u can define a MACRO in a function body.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Once or twice, but then again having to worry about distributing a 20+ MB runtime more than makes up for it!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
i want to transform the coordinates of the mouse into 3d projection
Ramez Raafat
|
|
|
|
|
That sounds a vit vague to me.
Where is your Z value coming from? What are you trying to do? Are you clicking on a 3d image and want to know the depth as well? Are you wanting to create something in 3D with the mouse?
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
You have to use the Isolatic Mouse cross pollenation subfrequency.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
leppie wrote:
Isolatic Mouse cross pollenation subfrequency
Yes, but don't forget to cross-connect it to the third phase inducer plasma manifold. Otherwise the calibration of the dilithium crystal harmonisation routine will be ineffective and cause a phase variance feedback loop that will cause the automatic ejection of the mouse core.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
Don't forget to engage the subatomic 3D hypogenerative mesh analyzer, otherwise all multi-axis cross pararllel calculations will be off by at least +/- 3 subneural nanometers.
- Nick Parker My Blog
|
|
|
|
|
Nick Parker wrote:
...will be off by at least +/- 3 subneural nanometers.
True, but at that error variance it is also possible to activate the heisenberg compensator in order to mitigate any misalignment of the multi-axis cross parallel interconnectors. Thus allowing a steady stream of negatively charged subatomic particles to pass freely through the integral data coupling array.
...
You know, I think we've all been watching too much Science Fiction.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
Colin Angus Mackay wrote:
Thus allowing a steady stream of negatively charged subatomic particles to pass freely through the integral data coupling array.
Too true, but remember that by taking the integral of the guid generating function we can discern the total surface area of the applications UI in pixels.
Colin Angus Mackay wrote:
You know, I think we've all been watching too much Science Fiction.
Says who??
- Nick Parker My Blog
|
|
|
|
|
I'm uncertain whether this thread is supposed to be taken seriously or not (judging by other responses), but I have converted mouse coordinate X,Y into a ray from Point1(X,Y,Z) to Point2(X,Y,Z) in OpenGL. If that's any good to you, reply to me and I'll post the code.
Regards
Brewman
|
|
|
|
|
It is a serious thread. Some of us were just having some fun.
--Colin Mackay--
|
|
|
|
|
You should post your reply to me through the forum and not directly in my email. You might receive a broader response.
START EMAILED REPLY ----
hi
i am in virtual 3D room and i want to choose something from the wall
END EMAILED REPLY ----
--Colin Mackay--
|
|
|
|
|
sorry for disturbing u colin
|
|
|
|
|
This code is for CsGL, a C# wrapper for OpenGL, but I'm sure that the concept applies to other graphical 3D stuff.
In a 2D representation of a 3D scene (i.e. most pictures, TV, cinema, etc), a point on the 2D surface represents a line in 3D space. In openGL, this 3D space is bounded by clipping planes. The following code takes the mouse's X-Y coordinates and calculates a line (or ray) that passes through those clipping planes. Note that the OpenGL mouse Y coordinate is 'inverted' to Windows mouse Y Coordinate.
Note that the following code won't quite work 'out of the box' (I've removed some stuff to condense things), but you should be able to construct working code with little effort.
- You need the ModelView, ModelPort & Projection state, saved like the following code:
public class OGLMatrixState
{
public void Save()
{
GL.glGetDoublev(GL.GL_PROJECTION_MATRIX, savedProjectionMatrix);
GL.glGetDoublev(GL.GL_MODELVIEW_MATRIX, savedModelviewMatrix);
GL.glGetIntegerv(GL.GL_VIEWPORT, savedViewportArray);
}
private double[] savedProjectionMatrix = new double[16];
private double[] savedModelviewMatrix = new double[16];
private int[] savedViewportArray = new int[4];
}
- You need the built-in conversion routines that OpenGL provides:
public static SEG.Line ViewXYToRay(double vX, double mouseY, OGLMatrixState matrixState)
{
double vY = matrixState.Viewport[3] - mouseY;
double pX,pY,pZ;
SEG.Point nearPt = new SEG.Point();
SEG.Point farPt = new SEG.Point();
GL.gluUnProject(vX, vY, 0.0, matrixState.Modelview, matrixState.Projection, matrixState.Viewport, out pX, out pY, out pZ);
nearPt.X = pX;
nearPt.Y = pY;
nearPt.Z = pZ;
GL.gluUnProject(vX, vY, 1.0, matrixState.Modelview, matrixState.Projection, matrixState.Viewport, out pX, out pY, out pZ);
farPt.X = pX;
farPt.Y = pY;
farPt.Z = pZ;
SEG.Line rayFromNearToFar = new SEG.Line(nearPt, farPt);
return rayFromNearToFar;
}
Hope this helps
Regards
Brewman
|
|
|
|
|
would anybody tell me how to convert text to voice in .net
|
|
|
|
|
Try namespace Microsoft.Speech5 and class SpVoiceClass.Speak(string,SpeakFlags). Microsoft.Speech5 is located in external library "speech5.dll"
Wizard_01
|
|
|
|
|
heba_zien wrote:
would anybody tell me how to convert text to voice in .net
You will need to get the Microsoft Speech SDK[^].
- Nick Parker My Blog
|
|
|
|
|
When I use Microsoft's sproxy.exe (version 7.00.9466) to create a web reference in a Visual C++ application, I get an error message: SDL1000 : Not enough storage is available to complete this operation. If I remove the fault element from the operation element, the header is generated. See wsdl below. Any ideas?
Thanks,
Rick
<?xml version = '1.0'?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns2="http://xmlns.catch.com/ws/types"
xmlns:tns="http://xmlns.catch.com/ws"
name="RemoteAccess"
targetNamespace="http://xmlns.catch.com/ws">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://xmlns.catch.com/ws/types"
targetNamespace="http://xmlns.catch.com/ws/types">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="WebServiceException">
<sequence>
<element name="errorCode" type="int"/>
<element name="message" type="string"/></sequence></complexType>
</schema></types>
<message name="RemoteAccessProvider_endSession"/>
<message name="RemoteAccessProvider_endSessionResponse"/>
<portType name="RemoteAccessProvider">
<operation name="endSession" parameterOrder="">
<input message="tns:RemoteAccessProvider_endSession"/>
<output message="tns:RemoteAccessProvider_endSessionResponse"/>
<fault name="WebServiceException" message="tns:WebServiceException"/></operation>
</portType>
<binding name="RemoteAccessProviderBinding" type="tns:RemoteAccessProvider">
<operation name="endSession">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://xmlns.catch.com/ws"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://xmlns.catch.com/ws"/></output>
<!-- Offending Code, remove and sproxy.exe works.-->
<fault name="WebServiceException">
<soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://xmlns.catch.com/ws/"/></fault>
<!-- Offending Code End -->
<soap:operation soapAction=""/></operation>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
<service name="RemoteAccess">
<port name="RemoteAccessProviderPort" binding="tns:RemoteAccessProviderBinding">
<soap:address xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" location="http://localhost/ws"/></port></service></definitions>
|
|
|
|