|
Personally I like to use panels. I just place the tables and all other controls in it and then display the panel when I want to.
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
Just make the table runat="server" and then use uts visibility property and set it to true or fals according to your needs.
|
|
|
|
|
Hi All,
I need make a text editor like we have in Yahoo Mail when we are composing mail ie; I can make text(ie body of mail) bold, change the color or any other thing.
Finally when I click on save it should be save in Database in HTML format and while retriving it display in text format but not in HTML format.
I am using ASP.NET 2005(VB).
Please help me how should I go about the same.
Thanks in advance...
|
|
|
|
|
|
Hi
Our company has Mercury IT Governance tool, this is a software developed in Java/J2EE to give portfolio management. Mercury gives various web services to use the tool. One of such web service WSDL content I am attaching for your reference. I am able to add web reference to this WSDL file, but The problem is I am unable to call the web methods, in fact I am getting the error while compiling the site.
Error 10 Unable to import binding 'RequestSoapBinding' from namespace 'http://mercury.com/itg/dm/1.0'. App_WebReferences/WebReference/
Can anyone kindly tell me what does this error mean?
I am using ASP.NET 2.0, please help...Thanks in advance.
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:types="http://mercury.com/itg/dm/1.0/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:intf="http://mercury.com/itg/dm/1.0" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://mercury.com/itg/dm/1.0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://mercury.com/itg/dm/1.0/types">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:complexType name="Value" abstract="true">
<xsd:sequence />
</xsd:complexType>
<xsd:complexType name="RequestHeader">
<xsd:sequence>
<xsd:element name="auditNote" type="xsd:string" />
<xsd:element name="origin" type="xsd:string" />
<xsd:element name="transactionName" type="xsd:string" />
<xsd:element name="credentials" type="types:Credentials" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Credentials" abstract="true">
<xsd:sequence />
</xsd:complexType>
<xsd:complexType name="LoginAccount">
<xsd:complexContent mixed="false">
<xsd:extension base="types:Credentials">
<xsd:sequence>
<xsd:element name="username" type="xsd:string" />
<xsd:element name="password" type="xsd:string" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ProcessingError">
<xsd:sequence>
<xsd:element name="errors" type="types:ArrayOf_types_ErrorMessage" />
<xsd:element name="message" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Field">
<xsd:sequence>
<xsd:element name="token" type="xsd:string" />
<xsd:element name="value" type="types:Value" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Reference" abstract="true">
<xsd:sequence>
<xsd:element name="creationDate" nillable="true" type="xsd:dateTime" />
<xsd:element name="name" nillable="true" type="xsd:string" />
<xsd:element name="description" nillable="true" type="xsd:string" />
<xsd:element name="addedBy" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Note" abstract="true">
<xsd:sequence>
<xsd:element name="creationDate" nillable="true" type="xsd:dateTime" />
<xsd:element name="content" type="xsd:string" />
<xsd:element name="addedBy" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Request">
<xsd:sequence>
<xsd:element name="fields" type="types:ArrayOf_types_Field" />
<xsd:element name="references" nillable="true" type="types:ArrayOf_types_Reference" />
<xsd:element name="notes" nillable="true" type="types:ArrayOf_types_Note" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ErrorMessage">
<xsd:sequence>
<xsd:element name="code" nillable="true" type="xsd:int" />
<xsd:element name="message" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Response">
<xsd:sequence>
<xsd:element name="references" nillable="true" type="types:ArrayOf_types_Reference" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Identifier">
<xsd:sequence>
<xsd:element name="serverURL" type="xsd:anyURI" />
<xsd:element name="id" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="FieldMetaData">
<xsd:sequence>
<xsd:element name="prompt" type="xsd:string" />
<xsd:element name="token" type="xsd:string" />
<xsd:element name="required" type="xsd:boolean" />
<xsd:element name="description" type="xsd:string" />
<xsd:element name="fieldType" type="xsd:string" />
<xsd:element name="listName" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SingleValue">
<xsd:complexContent mixed="false">
<xsd:extension base="types:Value">
<xsd:sequence>
<xsd:element name="tokenValue" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="MultipleValues">
<xsd:complexContent mixed="false">
<xsd:extension base="types:Value">
<xsd:sequence>
<xsd:element name="values" nillable="true" type="types:ArrayOf_xsd_string" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="DateValue">
<xsd:complexContent mixed="false">
<xsd:extension base="types:Value">
<xsd:sequence>
<xsd:element name="date" nillable="true" type="xsd:dateTime" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Table">
<xsd:complexContent mixed="false">
<xsd:extension base="types:Value">
<xsd:sequence>
<xsd:element name="tokens" type="types:ArrayOf_xsd_string" />
<xsd:element name="rows" type="types:ArrayOf_types_TableRow" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="URLReference">
<xsd:complexContent mixed="false">
<xsd:extension base="types:Reference">
<xsd:sequence>
<xsd:element name="URL" type="xsd:anyURI" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="RemoteReference">
<xsd:complexContent mixed="false">
<xsd:extension base="types:Reference">
<xsd:sequence>
<xsd:element name="status" type="xsd:string" />
<xsd:element name="displayURL" nillable="true" type="xsd:anyURI" />
<xsd:element name="identifier" type="types:Identifier" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="UserNote">
<xsd:complexContent mixed="false">
<xsd:extension base="types:Note">
<xsd:sequence />
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="FieldChangeNote">
<xsd:complexContent mixed="false">
<xsd:extension base="types:Note">
<xsd:sequence>
<xsd:element name="fieldPrompt" type="xsd:string" />
<xsd:element name="oldValue" type="xsd:string" />
<xsd:element name="newValue" type="xsd:string" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ArrayOf_types_Field">
<xsd:complexContent mixed="false">
<xsd:restriction base="soapenc:Array">
<xsd:attribute wsdl:arrayType="types:Field[]" ref="soapenc:arrayType" />
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="TableRow">
<xsd:complexContent mixed="false">
<xsd:restriction base="soapenc:Array">
<xsd:attribute wsdl:arrayType="types:Value[]" ref="soapenc:arrayType" />
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ArrayOf_types_TableRow">
<xsd:complexContent mixed="false">
<xsd:restriction base="soapenc:Array">
<xsd:attribute wsdl:arrayType="types:TableRow[]" ref="soapenc:arrayType" />
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ArrayOf_xsd_string">
<xsd:complexContent mixed="false">
<xsd:restriction base="soapenc:Array">
<xsd:attribute wsdl:arrayType="xsd:string[]" ref="soapenc:arrayType" />
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ArrayOf_types_Reference">
<xsd:complexContent mixed="false">
<xsd:restriction base="soapenc:Array">
<xsd:attribute wsdl:arrayType="types:Reference[]" ref="soapenc:arrayType" />
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ArrayOf_types_Note">
<xsd:complexContent mixed="false">
<xsd:restriction base="soapenc:Array">
<xsd:attribute wsdl:arrayType="types:Note[]" ref="soapenc:arrayType" />
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ArrayOf_types_FieldMetaData">
<xsd:complexContent mixed="false">
<xsd:restriction base="soapenc:Array">
<xsd:attribute wsdl:arrayType="types:FieldMetaData[]" ref="soapenc:arrayType" />
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ArrayOf_types_ErrorMessage">
<xsd:complexContent mixed="false">
<xsd:restriction base="soapenc:Array">
<xsd:attribute wsdl:arrayType="types:ErrorMessage[]" ref="soapenc:arrayType" />
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="mapItem">
<xsd:sequence>
<xsd:element name="key" nillable="true" type="xsd:anyType" />
<xsd:element name="value" nillable="true" type="xsd:anyType" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Map">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="item" type="types:mapItem" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="importRequestRequest">
<wsdl:part name="header" type="types:RequestHeader" />
<wsdl:part name="request" type="types:Request" />
</wsdl:message>
<wsdl:message name="importRequestResponse">
<wsdl:part name="importRequestReturn" type="types:Response" />
</wsdl:message>
<wsdl:message name="updateRemoteReferenceResponse">
<wsdl:part name="updateRemoteReferenceReturn" type="xsd:int" />
</wsdl:message>
<wsdl:message name="ProcessingErrorFault">
<wsdl:part name="fault" type="types:ProcessingError" />
</wsdl:message>
<wsdl:message name="updateRemoteReferenceRequest">
<wsdl:part name="header" type="types:RequestHeader" />
<wsdl:part name="receiver" type="types:Identifier" />
<wsdl:part name="source" type="types:Identifier" />
<wsdl:part name="newStatus" type="xsd:string" />
<wsdl:part name="fields" type="types:ArrayOf_types_Field" />
</wsdl:message>
<wsdl:message name="getRequestTypesByFieldGroupRequest">
<wsdl:part name="header" type="types:RequestHeader" />
<wsdl:part name="fieldGroup" type="xsd:string" />
</wsdl:message>
<wsdl:message name="getRequestTypesByFieldGroupResponse">
<wsdl:part name="getRequestTypesByFieldGroupReturn" type="types:ArrayOf_xsd_string" />
</wsdl:message>
<wsdl:message name="getRequestTypeFieldsRequest">
<wsdl:part name="header" type="types:RequestHeader" />
<wsdl:part name="requestType" type="xsd:string" />
</wsdl:message>
<wsdl:message name="getRequestTypeFieldsResponse">
<wsdl:part name="getRequestTypeFieldsReturn" type="types:ArrayOf_types_FieldMetaData" />
</wsdl:message>
<wsdl:message name="deleteRequestsRequest">
<wsdl:part name="header" type="types:RequestHeader" />
<wsdl:part name="requestIDs" type="types:ArrayOf_xsd_string" />
</wsdl:message>
<wsdl:message name="deleteRequestsResponse">
<wsdl:part name="deleteRequestsReturn" type="xsd:int" />
</wsdl:message>
<wsdl:message name="getDropDownListValuesRequest">
<wsdl:part name="header" type="types:RequestHeader" />
<wsdl:part name="listNames" type="types:ArrayOf_xsd_string" />
</wsdl:message>
<wsdl:message name="getDropDownListValuesResponse">
<wsdl:part name="getDropDownListValuesReturn" type="apachesoap:Map" />
</wsdl:message>
<wsdl:portType name="RequestServices">
<wsdl:operation name="importRequest" parameterOrder="header request">
<wsdl:input name="importRequestRequest" message="intf:importRequestRequest" />
<wsdl:output name="importRequestResponse" message="intf:importRequestResponse" />
<wsdl:fault name="ProcessingErrorFault" message="intf:ProcessingErrorFault" />
</wsdl:operation>
<wsdl:operation name="updateRemoteReference" parameterOrder="header receiver source newStatus fields">
<wsdl:input name="updateRemoteReferenceRequest" message="intf:updateRemoteReferenceRequest" />
<wsdl:output name="updateRemoteReferenceResponse" message="intf:updateRemoteReferenceResponse" />
<wsdl:fault name="ProcessingErrorFault" message="intf:ProcessingErrorFault" />
</wsdl:operation>
<wsdl:operation name="getRequestTypesByFieldGroup" parameterOrder="header fieldGroup">
<wsdl:input name="getRequestTypesByFieldGroupRequest" message="intf:getRequestTypesByFieldGroupRequest" />
<wsdl:output name="getRequestTypesByFieldGroupResponse" message="intf:getRequestTypesByFieldGroupResponse" />
<wsdl:fault name="ProcessingErrorFault" message="intf:ProcessingErrorFault" />
</wsdl:operation>
<wsdl:operation name="getRequestTypeFields" parameterOrder="header requestType">
<wsdl:input name="getRequestTypeFieldsRequest" message="intf:getRequestTypeFieldsRequest" />
<wsdl:output name="getRequestTypeFieldsResponse" message="intf:getRequestTypeFieldsResponse" />
<wsdl:fault name="ProcessingErrorFault" message="intf:ProcessingErrorFault" />
</wsdl:operation>
<wsdl:operation name="deleteRequests" parameterOrder="header requestIDs">
<wsdl:input name="deleteRequestsRequest" message="intf:deleteRequestsRequest" />
<wsdl:output name="deleteRequestsResponse" message="intf:deleteRequestsResponse" />
<wsdl:fault name="ProcessingErrorFault" message="intf:ProcessingErrorFault" />
</wsdl:operation>
<wsdl:operation name="getDropDownListValues" parameterOrder="header listNames">
<wsdl:input name="getDropDownListValuesRequest" message="intf:getDropDownListValuesRequest" />
<wsdl:output name="getDropDownListValuesResponse" message="intf:getDropDownListValuesResponse" />
<wsdl:fault name="ProcessingErrorFault" message="intf:ProcessingErrorFault" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="RequestSoapBinding" type="intf:RequestServices">
<wsdlsoap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
<wsdl:operation name="importRequest">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="importRequestRequest">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:input>
<wsdl:output name="importRequestResponse">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:output>
<wsdl:fault name="ProcessingErrorFault">
<wsdlsoap:fault use="encoded" name="ProcessingErrorFault" namespace="" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="updateRemoteReference">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="updateRemoteReferenceRequest">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:input>
<wsdl:output name="updateRemoteReferenceResponse">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:output>
<wsdl:fault name="ProcessingErrorFault">
<wsdlsoap:fault use="encoded" name="ProcessingErrorFault" namespace="" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="getRequestTypesByFieldGroup">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="getRequestTypesByFieldGroupRequest">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:input>
<wsdl:output name="getRequestTypesByFieldGroupResponse">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:output>
<wsdl:fault name="ProcessingErrorFault">
<wsdlsoap:fault use="encoded" name="ProcessingErrorFault" namespace="" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="getRequestTypeFields">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="getRequestTypeFieldsRequest">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:input>
<wsdl:output name="getRequestTypeFieldsResponse">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:output>
<wsdl:fault name="ProcessingErrorFault">
<wsdlsoap:fault use="encoded" name="ProcessingErrorFault" namespace="" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="deleteRequests">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="deleteRequestsRequest">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:input>
<wsdl:output name="deleteRequestsResponse">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:output>
<wsdl:fault name="ProcessingErrorFault">
<wsdlsoap:fault use="encoded" name="ProcessingErrorFault" namespace="" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="getDropDownListValues">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="getDropDownListValuesRequest">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:input>
<wsdl:output name="getDropDownListValuesResponse">
<wsdlsoap:body use="encoded" namespace="http://mercury.com/itg/dm/1.0" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:output>
<wsdl:fault name="ProcessingErrorFault">
<wsdlsoap:fault use="encoded" name="ProcessingErrorFault" namespace="" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="RequestServicesService">
<wsdl:port name="Request" binding="intf:RequestSoapBinding">
<wsdlsoap:address location="http://localhost:8080/itg/services/Request" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
|
|
|
|
|
|
Thank you so much, the information you gave helped me lot, thanks once again, request you to continue your help for us
|
|
|
|
|
I have master page/contant page. And in javascript i am accessing my content page controls like
document.getElementById('ctl00_ContentPlaceHolder1_TxtFName').focus();
I know this approach is wrong, because it is one way of hard coding for ContentPlaceHolder1 name.
How i can avoid this? If possible, please share some sample code....Thanks!!
Amit
|
|
|
|
|
Hi,
You can pass the ClientId from code behind to javascript function
and you can use the ClientId inside getElementById.
Can you explain what you are trying.so we can give more specific example.
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
i am trying to validate one of my content page text box thru java script.
Thx...
|
|
|
|
|
Hi,
it's possible.
for ex: When you are pressing a button you want to validate a text box.
In Page load add following code
MyButton.Attributes.Add("onclick", "javascript:MyJSFun('" & MyTextBox.ClientID & "')")
Then your JS function.
<br />
function MyJSFun(txt)<br />
{ <br />
alert(document.getElementById(txt).value)<br />
}<br />
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
hello friends .. I want to create simple login form with email and password.If user enters blank email or/and password...it must give errors but the page should not get refreshed. can any one give me simple javascript to do this..
Amit
|
|
|
|
|
why don't you use the required field validator control for that.
by using that, your page will not be postbacked and authencation will be done at client side
|
|
|
|
|
how to use requiredfield validator?
Amit
|
|
|
|
|
Hi
Add a requiredFieldValidator from validation controls.
Set ControlToValidate,errormessege Properties of the validator control.
Control to validate will be your textbox name.
Thats all....
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
drag a requiredfieldvalidator control next to your username textbox control
set the controltovalidate property of your requiredfieldvalidator control
set the error message property u want to display for example "User Name Required"
set the text property of your required field property to "*"
repeat this for password field
both username and password textboxes must contain a attribute <runat='server'> in their html view
now if u want to display the error messages at one place u can also just drag drop the validationsummary control
there u go...
if still u face a problem try google or ask again
-- modified at 8:37 Wednesday 23rd May, 2007
|
|
|
|
|
In java script add return false like
function bResetControls()
{
return false;
}
Thanks
Amit
|
|
|
|
|
In my application my requirement is pdf security if u type the physical path of a pdf file in an browser it should redirect to the login page that is the need in my application
At this time i am getting the following errror" request for the permission of aspnethostingpermission in asp.net system version=1.0.5000.0 cultural=neutal publickeytoke=b77ac5......"
like this it is displaying can any body give the idea regarding this error so that i can complete my task
thanks and regards,
Eswar.
|
|
|
|
|
Give some more details....like what you did till now and some sample code
|
|
|
|
|
Hi,
I created one user with name "srinivasanb" and pwd "Mpls7880" in my system giving full rights for that user( In my system only i have docs folder for file server) and same username & pwd was created on host system there also giving full rights for that user.
In put web.config and data.config and bin folder,template folder,xml folder,documents folders in docs folder in my system.
In web.config file i included the following code
------------------------------------------------
httpHandlers
add verb="*" path="*.pdf" type="Coverpoint.WillisBloodstock.BusinessServices.FileHandler,BusinessServices"
add verb="*" path="*.doc" type="Coverpoint.WillisBloodstock.BusinessServices.FileHandler,BusinessServices"
add verb="*" path="*.xml" type="Coverpoint.WillisBloodstock.BusinessServices.FileHandler,BusinessServices"
add verb="*" path="*.xls" type="Coverpoint.WillisBloodstock.BusinessServices.FileHandler,BusinessServices"
/httpHandlers
add key="WebSiteURL" value="http://localhost/Bloodstock2.2/"/
authentication mode="None"/
authorization
allow users="*"/
/authorization
In globalization tag i am giving the username and password which were created in my system and hosted machince (on both machines users should have same name and pwd)
identity impersonate="true" userName="zslindia\srinivasanb"
password="Mpls7880" /
Note:I removed less thn and greater than symbols ( tags )in web.config please recognise so that to print user friendly
login.aspx
----------
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
1,
txtUserName.Text.Trim(),
DateTime.Now,
DateTime.Now.AddMinutes(180),
true,
txtPassword.Text.Trim(),
FormsAuthentication.FormsCookiePath);
// Encrypt the ticket.
string encTicket = FormsAuthentication.Encrypt(ticket);
// Create the cookie.
Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, encTicket));
//Response.Cookies.Add(new HttpCookie("username", euser.UserName));
Response.Cookies.Add(new HttpCookie("userid", euser.UserId.ToString()));
//Userinfo is put into session object
Session["sUserObject"] = euser;
filehandler.cs
--------------
public void ProcessRequest(System.Web.HttpContext context)
{
string FileName = context.Server.MapPath(context.Request.FilePath);
if (System.Web.HttpContext.Current.Request.Cookies["Coverpt"] == null || System.Web.HttpContext.Current.Request.Headers["Referer"] == null)
{
context.Response.Redirect(System.Configuration.ConfigurationSettings.AppSettings["WebSiteURL"] + "Common/Login.aspx?User=Anonymous&ReturnUrl=" + System.Web.HttpContext.Current.Request.RawUrl.ToString());
}
else
{
if (FileName.ToLower().EndsWith(".xls"))
{
context.Response.ContentType = "application/vnd.ms-excel";
context.Response.WriteFile(FileName);
}
else if (FileName.ToLower().EndsWith(".doc"))
{
context.Response.ContentType = "application/vnd.ms-word";
context.Response.WriteFile(FileName);
}
else if (FileName.ToLower().EndsWith(".pdf"))
{
long appId = 0;
long originalAppId = 0;
int clauseId = 0;
FileName = FileName.ToLower();
string filename = FileName.Replace(".pdf", "");
// int lastIndex = 0;
// int stringLength = 0;
// System.IO.FileInfo a = new System.IO.FileInfo(FileName);
if (FileName.ToLower().IndexOf("endorsement") > 0)
{
string[] splitedString = filename.Split('_');
if (splitedString.Length > 1)
{
originalAppId = Convert.ToInt64(splitedString[splitedString.Length - 1]);
}
//appId = Convert.ToInt64(filename.Substring(filename.LastIndexOf("_")+1));
}
else if (FileName.ToLower().IndexOf("wemmta") > 0)
{
string[] splitedString = filename.Split('_');
if (splitedString.Length > 1)
{
originalAppId = Convert.ToInt64(splitedString[splitedString.Length - 1]);
}
//appId = Convert.ToInt64(filename.Substring(filename.LastIndexOf("_")+1));
}
else if (FileName.ToLower().IndexOf("certificate") > 0)
{
string[] splitedString = filename.Split('_');
if (splitedString.Length > 2)
{
appId = Convert.ToInt64(splitedString[splitedString.Length - 2]);
originalAppId = Convert.ToInt64(splitedString[splitedString.Length - 1]);
}
}
else if (FileName.ToLower().IndexOf("wem") > 0)
{
string[] splitedString = filename.Split('_');
if (splitedString.Length > 3)
{
appId = Convert.ToInt64(splitedString[splitedString.Length - 3]);
originalAppId = Convert.ToInt64(splitedString[splitedString.Length - 2]);
}
}
else if (FileName.ToLower().IndexOf("schedule") > 0)
{
string[] splitedString = filename.Split('_');
if (splitedString.Length > 3)
{
appId = Convert.ToInt64(splitedString[splitedString.Length - 3]);
originalAppId = Convert.ToInt64(splitedString[splitedString.Length - 2]);
}
}
else if (FileName.ToLower().IndexOf("invoice") > 0)
{
string[] splitedString = filename.Split('_');
if (splitedString.Length > 3)
{
appId = Convert.ToInt64(splitedString[splitedString.Length - 3]);
originalAppId = Convert.ToInt64(splitedString[splitedString.Length - 2]);
}
}
else if (FileName.ToLower().IndexOf("wording") > 0)
{
string[] splitedString = filename.Split('_');
if (splitedString.Length > 1)
{
appId = Convert.ToInt64(splitedString[splitedString.Length - 2]);
originalAppId = Convert.ToInt64(splitedString[splitedString.Length - 1]);
}
}
else if (FileName.ToLower().IndexOf("quotation") > 0)
{
string[] splitedString = filename.Split('_');
if (splitedString.Length > 1)
{
appId = Convert.ToInt64(splitedString[splitedString.Length - 2]);
originalAppId = Convert.ToInt64(splitedString[splitedString.Length - 1]);
}
}
else if (FileName.ToLower().IndexOf("clause") > 0)
{
string[] splitedString = filename.Split('_');
if (splitedString.Length > 2)
{
appId = Convert.ToInt64(splitedString[splitedString.Length - 2]);
originalAppId = Convert.ToInt64(splitedString[splitedString.Length - 1]);
}
else
{
clauseId = Convert.ToInt32(splitedString[splitedString.Length - 1]);
}
}
Int32 userId = 0;
if (System.Web.HttpContext.Current.Request.Cookies["userid"] != null)
{
userId = Convert.ToInt32(System.Web.HttpContext.Current.Request.Cookies["userid"].Value);
}
if (userId > 0)
{
DAL.CommanTask commanTaskDALObj = new CommanTask();
bool verified = commanTaskDALObj.VarifyPDFDocument(userId, appId, originalAppId, clauseId);
if (verified == true)
{
context.Response.WriteFile(FileName);
}
else
{
context.Response.Redirect(System.Configuration.ConfigurationSettings.AppSettings["WebSiteURL"] + "Common/Login.aspx?User=Anonymous&ReturnUrl=" + System.Web.HttpContext.Current.Request.RawUrl.ToString());
}
}
else
{
context.Response.Redirect(System.Configuration.ConfigurationSettings.AppSettings["WebSiteURL"] + "Common/Login.aspx?User=Anonymous&ReturnUrl=" + System.Web.HttpContext.Current.Request.RawUrl.ToString());
}
}
}
}
Now i am trying to give physical path of the pdf i am getting the following error"system.security.securityexception:request for the permission of aspnethosting permission version=1.0.5.000...culture=neutral publickeytoken=b77.." instead i need to go login.aspx page for the security purpose after login credentials were matched na i pdf will get opened that is the requirement
some time i am getting the errror please do some help regarding this task
thanks and regards,
eswar
-- modified at 9:17 Wednesday 23rd May, 2007
|
|
|
|
|
I also had the same message. But i was not using any security related things in my Web App. I resolved my problem by running "aspnet_regiis -i". When I had this problem i searched and found that this problem arises if IIS is installed after the VS.Net 2005 / 2003. Try this. It might help you too.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Hi All
How can I add Textbox Dynamically when I click on a button in Javascript. Pls give me an example.
Thanks in Advance.
|
|
|
|
|
hello Bangash,
onbutton click call a function
OnClick = "return AddText();"
AddText()
{
response.redirect("Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|
|
Thank u yar but its not working.
|
|
|
|
|
Hi
add a div in to your page, where you want to add the text box.
eg:
<br />
<div id="div1"></div><br />
then in your javascripr code add following code to create text box
<br />
document.getElementById("div1").innerHTML+="<input type='text' <br />
name='text1'/>";<br />
I think this will help You. please post your result.
-- modified at 8:20 Wednesday 23rd May, 2007
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|