|
When you debug your app did you receive any Errors or Warning ? if yes please show us the Messages
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hey by the way i relly missed out 2 mention... actually before i deployed my application my web.config file was:
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=MOHDASHRAF-PC;Persist Security Info=True;User ID=sa;Password=123"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers> -->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>
on googling out i found out that my web.config file needs handlers and modules so at the time of deploying i changed it to
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=MOHDASHRAF-PC;Persist Security Info=True;User ID=sa;Password=123"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.webServer>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.webServer>
</configuration>
Now as u said wen i try 2 debug with the new web.config file it works fine... but on the error list i get 32messages... But my applications works absolutely fine... Deployment is the only problem as i mentioned at the beginning...
|
|
|
|
|
can we see those messages
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Message 1 Could not find schema information for the element 'validation'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 2 Could not find schema information for the attribute 'validateIntegratedModeConfiguration'.
Message 3 Could not find schema information for the element 'modules'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 4 Could not find schema information for the element 'add'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 5 Could not find schema information for the attribute 'name'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 6 Could not find schema information for the attribute 'preCondition'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 7 Could not find schema information for the attribute 'type'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 8 Could not find schema information for the element 'handlers'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 9 Could not find schema information for the element 'remove'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 10 Could not find schema information for the attribute 'name'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 11 Could not find schema information for the element 'add'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 12 Could not find schema information for the attribute 'name'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 13 Could not find schema information for the attribute 'verb'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 14 Could not find schema information for the attribute 'path'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 15 Could not find schema information for the attribute 'preCondition'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 16 Could not find schema information for the attribute 'type'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 17 Could not find schema information for the element 'add'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 18 Could not find schema information for the attribute 'name'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 19 Could not find schema information for the attribute 'verb'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 20 Could not find schema information for the attribute 'path'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 21 Could not find schema information for the attribute 'preCondition'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 22 Could not find schema information for the attribute 'type'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 23 Could not find schema information for the element 'add'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 24 Could not find schema information for the attribute 'name'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 25 Could not find schema information for the attribute 'preCondition'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 26 Could not find schema information for the attribute 'verb'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 27 Could not find schema information for the attribute 'path'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 28 Could not find schema information for the attribute 'type'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 29 Could not find schema information for the element 'compilation'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 30 Could not find schema information for the attribute 'debug'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 31 Could not find schema information for the element 'authentication'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
Message 32 Could not find schema information for the attribute 'mode'. C:\Users\Mohd Ashraf\Documents\Visual Studio 2005\WebSites\WebSite15\Web.Config
These are the Messages that i get when i debug the application...
Thanx in advance....
|
|
|
|
|
Good Day Thashif
First i took your Handler and i see there was a Difference between mine and yours and they appear in Different location.
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
the Handlers on my side appears after this
<compilation debug="false">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
and your Compilation is has an Opening tag and no Closing Tag. To Resolve this make a backup of your Web.config and create a new one and let the comments guide you. You cannot add anything ,anywhere.
Tell me if you still have a Problem
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
My compilation doesnt reqire a close tag i dont have anything within it...so its as follows:
<compilation debug="true"/>
Thanx for guiding me what am i supposed to change... Sorry i dint actually understand...
|
|
|
|
|
after that Statement add the HTTPModules as i did and build it again. Remember if you build it and you get Errors on your Web.config. It will give you a problem when you try to deploy. So try it and tell me
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi.. I added the httpHandlers u posted and also added the assemblies presnt inside the compilation tag... i debugged my application it gave no errors.. application was as usual wit no problems... but wen i deploy it i still receive the same error msg
Error Summary:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x8007000d
Config Error The configuration section 'httpHandlers' cannot be read because it is missing a section declaration
Config File \\?\C:\inetpub\wwwroot\Test2\WebSite15\web.config
Requested URL http://localhost:80/test2/WebSite15/
Physical Path C:\inetpub\wwwroot\Test2\WebSite15\
Logon Method Not yet determined
Logon User Not yet determined
Config Source:
26: </modules>
27: <httpHandlers>
28: <remove verb="*" path="*.asmx"/>
The only change is in the Config source comparing 2 the later error message...
Thanx...
|
|
|
|
|
So no Errors and Warning ?
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Nope, no errors and warnings... Im breaking my head for it....
|
|
|
|
|
Ok , Right Click in your Solution and Clean the Solution and save and Close Visual Studio and open it again and Build it and try it again.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Clean the solution... how do i do that... i dont find anything called clean wen i right click the solution...
Thanx in advance...
|
|
|
|
|
look at this
http://www.tiyaneproperties.co.za/SSIS/Clean_Solution.JPG[^]
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I think that must be available in VS2008... Im using VS2005... I dont find any clean option in it...
Regards,
Thashif
|
|
|
|
|
no its even available in VS2005. it does not appear anywhere. Right click on the Solution Explorer not on your website
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Sorry its nt available....
|
|
|
|
|
The Screenshot i made you, was from VS2005
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
im using fileupload to upload images.. written code in button click..
once i click the button image is displayong but the path is disappearing on its postback i want the path of image uploaded even after image is displayed...
thanks
/to display image
string virtualFolder = "~/Uploads1/";
string physicalFolder = Server.MapPath(virtualFolder);
FileUpload1.SaveAs(physicalFolder + FileUpload1.FileName);
Image1.Visible = true;
Image1.ImageUrl = virtualFolder + FileUpload1.FileName;
|
|
|
|
|
--Try this--
String virtualFolder = Server.MapPath(@"Uploads1\\");
if (FileUpload1.HasFile)
{
String fileName = FileUpload1.FileName;
virtualFolder += fileName;
FileUpload1.SaveAs(virtualFolder);
}
else
{
//error statement
}
|
|
|
|
|
no its same as page is posted back...
|
|
|
|
|
I think we can not display the name of the file which is uploaded because property fileupload.filename is readonly and it can be set only if user browse the image
|
|
|
|
|
actually what im trying is to upload a image and display its thumbnail..
and then insert into into database..
but as once page is posted fileupload is empty there is no path to insert into database....
any other method....
|
|
|
|
|
Hi,
I have created a NumberBox Control usercontrol which is working fine.
in the numbox ,we have a feature for the number box.
i.e we are restricted the input based on the format.
Like if the format is (8,2),then the input is restricted beyond these locations.
i.e example:
12345678.88 :entry completly restricted ,
12345678 : enrty restricted till we enter a '.' (dot seperator),
.99 : entry restricted after the . dot seperator as the precesion is 2. but can enter before
dot seperator
this is working fine.
but the problem is when i select textbox and try to press the number, it is not clearing the numbers. which is a problem ..
i.e consider i enter 12345678.99 or .00 or 12345678 ,
and select the content it does not allow to clear when i enter a number, as the cursor position is in the end , and it has to restirict .
so is there any way i could aviod this .
i.e is there any way i could check in the script that if the data in textbox is selected or not ?
so based on which i could allow the input to be cleared.
thanks in advance,,,,
Thanks and Regards,
sriharsha
|
|
|
|
|
The Best way is to fire a JavaScript Function on 'OnBlur' event of the TextBox Where you can check the formats .
|
|
|
|
|
but onblur is once it comes out of the textbox.
we are trying to restrict it based on the format during the time of input.
i.e based on the format input is restricted , i.e it is a kind of masking.
but only when i select and try to input , it does not clear as the cursor position is in the end.
is there any way i could checkh if it is selected based on which i could clear onslect
|
|
|
|
|