|
|
|
I am developing a web application that uses Forms authentication however it has a few web service methods so that I can script some maintenance tasks and allow other administrative functions. Is there an easy way to change a sub folder to use Windows authentication instead of Forms without multiple web applications or web.config files. I tried to override it using the <location path="wsapi"> option but am getting "configuration section not allowed to be set below application." when looking in IIS. Any thoughts on how to use both methods without deploying a separate app?
The network is down...let's go get bagels.
|
|
|
|
|
I think you can use multiple web.config files,in a web app. Just make a new one and drop it in the folder. The web.config will work on all sub folders beneath that folder.
|
|
|
|
|
If you don't want to add extra web.config files in the subfolder, you can add a <location> section in your main web.config.
<location path="Restricted">
<system.web>
<authorization>
<stuff>
</authorization>
<authentication>
<more stuff>
</authentication>
</system.web>
</location>
|
|
|
|
|
Is there perhaps a machine or web.config setting that could be preventing it? IIS throws up errors when I am using the <location> tag.
The network is down...let's go get bagels.
|
|
|
|
|
What's the error messages?
|
|
|
|
|
You cannot mix the two authentication methods. You can only use one authentication method per site, so you have to pick either Forms or Windows.
The only thing you can do with a sub folder is change the authorization, which is something separate.
|
|
|
|
|
|
I agree that the OP might be able to impliment this to work with their application, but my point is still valid. As the article states "While you might like to just combine Forms and Windows authentication, its not that easy. Each ASP.NET application can only have one authentication type, so you need to pick just one."
|
|
|
|
|
|
Hi,
I have a web page in which I have a text box for month to validate the credit card expiration. I am using asp.net custom control for that.
Can anybody please help me to write the javascript or jquery method to validate the given two digits value is month or not? Any help would be really helpfull to me. I will be googling in this mean time.
Thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
See here and here
But instead of validation - provide the users with a combo-box that lists the month values (for example "01", "02", "03", etc).
From this they select the relevant month and you know that it will be a valid value.
|
|
|
|
|
Hi All,
I'm implementing Forms Authentication, using SQL Server 2008, with the target .NET Framework 3.5.
In the Web.config file I have the following:
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name=".ASPXMELAUTH" timeout="30" defaultUrl="MainScreen.aspx" cookieless="AutoDetect"/>
</authentication>
When I run the application and login a cookie is created in the Cookies folder with what appears to be a random number of type Txt. Also in the Temp. Internet Files folder a file that seems to point to this cookie file is called "cookie:userName@localhost.com". The first text in this file reads ".ASPXMELAUTH".
My question is, is this the correct behavior for Forms Authentication? I was thinking the file itself would be named "randomCode.ASPXMELAUTH".
Thank you,
Mel
|
|
|
|
|
Unless you are overwriting the creation of the cookie, yes, it is normal.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Ok. Thank you for your feedback Ryan.
I'm happy to hear it's working as it should.
Do you know of any web sites that document this?
Thank again.
|
|
|
|
|
Hi
Does anybody know how to integrate Paypal Advanced Payments / Paypal Payflow link in C# and asp.net . We have already taken the account and read their documentation . It says to post to below url with username and password created in paypal manager which we are passing correctly but not displayed here because of security reasons. But it always give error in browser : Invalid merchant id and merchant id does not exist whereas it exists and shows in paypal manager as well. Their technical support is taking too long to resolve this issue. then they told us to post to another url which is same as below but instead of payflowlink , it will be payflowpro and then we will get the securetoken from paypal and then post it to payflowlink. we tried that as well but in that case , nothing is returned from paypal website and it always say : Connection has been closed in the browser.
https://payflowlink.paypal.com/?"PARTNER=PayPal&VENDOR=technoark43&USER=managerusername &PWD=managerpassword&TRXTYPE=A&AMT=40.00&CREATESECURETOKEN=Y&SECURETOKENID=1252875de1413adsdd60c86cdsdb15"
If anybody have integrated this method of paypal , then it will be of help to us as we want to integrate this asap.
|
|
|
|
|
masterprogrammertech wrote: https://payflowlink.paypal.com/?"PARTNER=PayPal&VENDOR=technoark43&USER=managerusername &PWD=managerpassword&TRXTYPE=A&AMT=40.00&CREATESECURETOKEN=Y&SECURETOKENID=1252875de1413adsdd60c86cdsdb15"
You should move the double quote to beginning of url, but I doubt that will fix it
Looks like you need to url encode the url before transmission to fix the dot . in 40.00, I think the dot is an illegal url char
[EDIT]
The dot is a legal character, what was I thinking!
AMT=40.00
"https://payflowlink.paypal.com/?PARTNER=PayPal&VENDOR=technoark43&USER=managerusername &PWD=managerpassword&TRXTYPE=A&AMT=40.00&CREATESECURETOKEN=Y&SECURETOKENID=1252875de1413adsdd60c86cdsdb15"
modified 2-May-12 15:57pm.
|
|
|
|
|
Hi
There is an update. We have finally got the response from paypal and everything is working now.
i am attaching 3 files. a.html is the first request to obtain securetoken from paypal in order to submit the transaction.
that is happening in a correct manner (for security reason , i have removed the password from a.html).
but now when the response is coming from paypal side , a file gets downloaded in the browser whereas paypal should give the response either through querystring or hidden field or some other manner directly in our side rather than giving us this file which downloads in browser. this file is attached and named as "download (14)".
now because of this problem we are unable to send next request which requires values which are sent by paypal . but manually i have tried to post next request which is b.html and it is working fine and i have attached this file for reference as well.
Now another problem is paypal after processing the payment is returning us all values on successful page but is returned as shown in the error.jpg which is attached and is returning in form tag . So how should i read this response as this is not querystring. You can check this in the screnshot : error.jpg . as i am unable to read this , i am unable to process this further . These are 2 blocking issues now. ideally 1st blocking issue i have surpassed by using another dll of paypal but because of this second , i am unable to move further.
For future, please let me know how to read first response as well where file gets downloaded in browser though we are sending fields in hidden fields as in a.html.
NOTE :I am unable to add the attachments of 4 files as named above. How do i do that on this forum?
|
|
|
|
|
Are you using PayPal Pro?
If so, are you using the paired value version or the xml version?
We wrote our PayPal stuff years ago, and not many of our customers use their products and services, so I'm not familiar with PayPal PayFlow.
Basically their is the AIM version and the CIM version of services, CIM uses their pages to collect information, and with AIM, you have to write the whole thing.
I can help you, but your post is confusing me.
[EDIT]
Well after reading your post a couple of more times, and eating lunch, I suspect your using the CIM method, in which you created a webform with textboxes, that post to PayPal, and return the results back to your form.
It's been 10 years since I've used PayPal in that manner. I don't remember how it works exactly, so I going to pass on this subject. If your doing the latter, let me know.
modified 2-May-12 16:04pm.
|
|
|
|
|
No this is their new product. Payflow link or paypal advanced payments.
Ok i just want to know i am receiving reply from paypal on a specific page but in visual studio 2005 when i see that response while debugging , it is shown inside form. i am not sure what is form is ? when you will debug and when you will try to see the value of a variable it will open the response element and there is a option form there , it shows response there in the format
city=delhi&country=india. i thought this was querystring so was tring to read through request.querystring but then my variables didnt fill with the response though response is still there on the page. i think i dont know how to read response when it comes in form element in visual studio 2005.
Please help if you can.i can send you a screenshot image which i am seeing an option to upload here. if you can give me your email, i can do that or some other way if you still didnt understand what i am saying.
Thanks.
|
|
|
|
|
That's called a named / value pair, it's not a query string. Don't confuse what you transmit in a web request with what you type in the browser url window.
name = value
amount = value
and is separated by any char you choose. They just happen to choose a ampersand, so it looks like a query string. The separator char can be a | as well. JSON uses something similar as well. Other companies let you choose the sep character when transmitting the request, so we use the | char. PayPal wants to use the ampersand to make it more confusing.
[LESSON]
A web response is the pure essence, or purpose of response.write. response.write is not for returning a html tag like response.write("<>< >""), but is made to return a request like response.write("name=John Doe&amount=40.00¤cycode=USD") in which there is no html.
So when you transmit, you build your name/value string
strPostBuild = New StringBuilder
With strPostBuild
.Append("USER=" & API_UserName)
.Append("&PWD=" & API_Password)
.Append("&SIGNATURE=" & API_Signature)
.Append("&VERSION=" & API_Version)
.Append("&METHOD=" & API_Method)
.Append("&TRANACTIONID=" & API_TransactionID)
.Append("&AMT=" & API_Amount)
.Append("&TRANSACTIONENTITY=" & "ORDER")
.Append("&CURRENCYCODE=" & API_CurrencyCode)
End With
strPost = strPostBuild.ToString
Then you parse the response from PayPal
Dim values As String
values = TheGatewayResponse
Dim Capture As String() = Nothing
Capture = values.Split("&")
Dim ResponseCollection As NameValueCollection = New NameValueCollection
Dim ResponseName As String = Nothing
Dim ResponseValue As String = Nothing
Dim slashPosition As Integer = 0
For Each DataField In Capture
slashPosition = DataField.LastIndexOf("=")
ResponseName = Left(DataField, slashPosition)
ResponseValue = DataField.Substring(slashPosition + 1)
ResponseCollection.Add(ResponseName, ResponseValue)
Next
I can't tell you what the Form is for, you would have to paste response string only in order for me to interpret it.
[WARNING]
Oh, a warning to you. I mock PayPal for providing sample code for programmers, because they never end up learning how it really works. Entry level programmers will make a few tweaks to the code, get it to work, and think they are code god, but when it breaks, they can't fix it, and run back to the paypal forum for help, in which perhaps maybe 1 guy knows how it works.
You should write your own code from scratch, and build on it to make it better. Then when you write for UPS, Payment Tech, you will have a clue as to how it works.
|
|
|
|
|
Hi
We have changed the complete design of our website . Now this website is live and previously was using techniques like gzipping .
Now when we changed the design , i opened the url as the code was on QA server. all the design got messed up because previous css classes and html and images was changed and my system cached in previous running css. Then i refreshed it , and it was ok.
But now the question : Our production users wont be knowing this issue and might not refresh the page so it will come distorted to them as well.
So i want a code something like this which will have the logic :
when we go live with this code in production and users who will be coming after our upload , their local cache should be deleted and everything should be downloaded again from the server on their browser but this should happen only for their first visit after our code upload , further visits after the first one should use the local cache which will be our new design.
Please help regarding this asap. Our website is in ASP.NET 2005 and running on IIS 7 and windows 2008 R2.
|
|
|
|
|
To the best of my knowledge, you can't do that. .Net law will not allow html to alter the users computers.
I think there is a metatag in the page header that tells the browser that everything is new, might be the cache tag. Look into the header tags first.
|
|
|
|
|
Right now iis is installed on my workstation and visual studio.net 2010 professional. The two items are not setup to communicte with each other. Thus my goal is to have asp.net communicate with IIS.
I tried to run the command aspnet_regii.exe -1 in the C:\Windows\Microsoft.NET\Framework64\v2.0.50727 directory but obtained the message, "This utility has limited capabilites on the Windows Vista Operating system. It is recommended that you use the "turn on or off windows features" options of the programs component of the Control Panel to install or remove ASP.NET. It is also recommended that you use the IIS Maanger component or the Appcmd.exe tool to configure ASP.NEt application".
In addition, the most current version of my directory for the .net framework is the following:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319.
Thus can you tell me what you think would be the best way to have asp.net communicate with iis on my workstation?
|
|
|
|