|
|
I can use a session variable in my vbscript but I get an error when I add the following line in the html to reference the code behind file.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
The error is:
The Session does not exists in the current context.
I want to use the code behind file, so how can I get this error to go away?
|
|
|
|
|
Good Evening All
I have a web Application that is compiling well with no Errors, i have Compiled each separately and worked well excluding the setup Project. i have to be honest, i once use the clean before i rebuilded the Solution and i came across this challenge. here is the Error on VS2005
http://www.vuyiswamaseko.tiyaneprope...ot_Compile.JPG[^]
And here is How my Project looks on the Solution Explorer
http://www.vuyiswamaseko.tiyaneprope...t_Explorer.JPG[^]
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi
please please please help!
i'm writing a asp.net app that imports data from an excel spreadsheet into a sql database, i slect a excel file and iterate through each row extracting the data, it works fine from my code and on the server but when i try doing the import from any other machine i get the following error:
System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC
my code is as follows
if (filMyFile.PostedFile != null)
{
HttpPostedFile myFile = filMyFile.PostedFile;
int nFileLen = myFile.ContentLength;
if (nFileLen > 0)
{
byte[] myData = new byte[nFileLen];
string strff = Path.GetFileName(myFile.FileName);
ApplicationClass app = new ApplicationClass();
Workbook workBook = app.Workbooks.Open(strff,
0,
true,
5,
"",
"",
true,
XlPlatform.xlWindows,
"\t",
false,
false,
0,
true,
1,
0);
Worksheet workSheet = (Worksheet)workBook.ActiveSheet;
int index = 0;
object rowIndex = 2;
object colIndex1 = 1;
object colIndex2 = 2;
object colIndex3 = 3;
object colIndex4 = 4;
object colIndex5 = 5;
object colIndex6 = 6;
object colIndex7 = 7;
object colIndex8 = 8;
object colIndex9 = 9;
try
{
while (((Range)workSheet.Cells[rowIndex, colIndex1]).Value2.ToString()!= string.Empty)
{
string OrderNumber = ((Range)workSheet.Cells[rowIndex, colIndex1]).Value2.ToString();
string FullName = ((Range)workSheet.Cells[rowIndex, colIndex2]).Value2.ToString();
string[] arrayFullName = FullName.Split(' ');
string FirstName = arrayFullName[0].ToString();
string Surname = arrayFullName[1].ToString();
string CustomerID = ((Range)workSheet.Cells[rowIndex, colIndex3]).Value2.ToString();
string VoucherNumber = ((Range)workSheet.Cells[rowIndex, colIndex4]).Value2.ToString();
string Address = ((Range)workSheet.Cells[rowIndex, colIndex5]).Value2.ToString();
string CustomerCellNumber = ((Range)workSheet.Cells[rowIndex, colIndex6]).Value2.ToString();
string CustomerTellNumber = ((Range)workSheet.Cells[rowIndex, colIndex7]).Value2.ToString();
string ConsignmentNumber = ((Range)workSheet.Cells[rowIndex, colIndex8]).Value2.ToString();
string HardwareDesc = ((Range)workSheet.Cells[rowIndex, colIndex9]).Value2.ToString();
thank you in advance..
|
|
|
|
|
DotNetCoderJunior wrote: it works fine from my code and on the server
Could you explain what you mean by this, I'm taking it as it works fine through debugging against your local environment and against a server environment whilst running a browser on that server, but not when browsing from another computer against the server?
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
|
|
|
|
|
thank you for your response,Yes that i sexactly what the problem is.
|
|
|
|
|
To solve this problem do this works:
1. Create directory “C:\Windows\SysWOW64\config\systemprofile\Desktop ” (for 64 bit Windows) or “C:\Windows\System32\config\systemprofile\Desktop ” (for 32 bit Windows)
2. Set Full control permissions for directory Desktop (for example in Win7 & IIS 7 & DefaultAppPool set permissions for user
“IIS AppPool\DefaultAppPool”)
آنقدر در زندگی شکست خورده ام تا عاقبت راه شکست دادن زندگی را فراگرفتم
|
|
|
|
|
This error might be occured in different scenarios
(1) if you try to access the Excel cells which is not existis like Cells[-1,0].
(2) When you try to insert an Excel Worksheet before a worksheet and after another worksheet using the Sheets.Add() method
(3) When you write the content of a two dimentional array having some special chanracters like '=''%' in the array elements into some range of cells.
Check whether the above scenarios occured in the server side.
Also instead of using Microsoft.Office.Interop.Excel.ApplicationClass in your automation code, try to use
Microsoft.Office.Interop.Excel.Application class to create the Excel application instance.
Hope this will help you.
|
|
|
|
|
Thanx dude changing my code to Microsoft.Office.Interop.Excel.Application worked
|
|
|
|
|
I am facing the same error!
this is my code:
Dim appExcel As Excel.Application
Dim wbBook As Excel.Workbook
Dim wsSheet As Excel.Worksheet
Dim strSheetName As String
On Error GoTo 0
Set appExcel = New Excel.Application
Set appExcel = CreateObject("Excel.Application")
Set wbBook = appExcel.Workbooks.Open(txtFile.Text, False, True)
If (wbBook Is Nothing) Then
Debug.Print "Invalid workbook"
End If
|
|
|
|
|
Hi All
I have created a web application where I load controls on different callbacks. So When User click on a button "Security" I have to load a security control using ajax which works fine. The problem I am facing is the following.
in Security Control I have one javascript function say ShowDetail(){ some js code here } which is required to be called when this control is loaded. When the control loads it does nto trigger , for testing I placed a button on contrl and on click I call ShowDetail() and it says that undefined function.
on another control I have Javascript with a variable say var id = '<%=this.ClientID%>'
so when I try to access "id" variable after loading that control Javascript rasie error with id is undefined.
Can any one help me out with these issues ?
Best Regards
Rizwan Bashir
Rizwan Bashir
<a href="http://www.alm-soft.com/">ALM Soft</a>[<a href="http://www.alm-soft.com/" target="_blank" title="New Window">^</a>]
|
|
|
|
|
i made a website which is working correctly on iis 6.0 but when i shift it to iis 7.0 it gives some errors i don't know how to fix it.
the error is as below
Could not load the assembly 'App_Web_xqefcnyj'. Make sure that it is compiled before accessing the page.
i republish the site but the error remain the same
Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434
the assamblies version used in web.config is
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">;
<add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A">
amirzada
|
|
|
|
|
Member 1405179 wrote:
Could not load the assembly 'App_Web_xqefcnyj'. Make sure that it is compiled before accessing the page.
i republish the site but the error remain the same
Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434
the assamblies version used in web.config is
Dou you have installed required framework for IIS ? Did you register it with ASP.NET using aspnet_regiis?
Here is one of my complete article on IIS 7.0, this may help you .
Deploying ASP. Net Websites on IIS 7.0
|
|
|
|
|
Hi,
i am working on embedding rss feeds in my site
it has worked fine in my local server
but when i have uploaded that one in web
it shows the following error
Exception Details:-
------------------
System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error :-
--------------
Line 41: {
Line 42: clrFeed.DataSource = "http://in.news.yahoo.com/myyahoo/rss/national-general.xml";
Line 43: clrFeed.DataBind();
Line 44:
Line 45: rssRediff.DataSource = "http://www.rediff.com/rss/inrss.xml";
My web.config file :-
--------------------
<location allowoverride="false">
<system.web>
<compilation debug="true">
<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">
--------------------------------------------------------------------------------------------------------------------
I dint embed the trust level tag in web.config. ( You can see the commented one )
my service provider provides medium trust level.
when i have applied trust level as medium in my web.config
it shows an error like
location allowoverride="false"
then i have changed the allowoverride to true. But its not working.
Can you please help me out in this regard
thanks in advance
|
|
|
|
|
Shared hosting servers will not allow you to change trust level higher than "Medium", you can replicate the same error on local machine by adding
<trust level="Medium" originUrl=""/> in web.config.
Sagar
|
|
|
|
|
Hi,
I am a new comer to web development,and i would like to know how IIS is configured in
Windows server 2003 for ASP.NET2.0 and how i could run the application after precompiling my project.
Plz help
|
|
|
|
|
|
If you are already familiar with the IIS console (Start button, Administrative tools, Internet Information Services Manager (also exists as a snap-in to a stand alone MMC)), the ASP .Net 2.0 part is easy. Right click on your web site in the IIS management console and select properties. There will be an ASP.Net tab in the properties window. Click on the tab and the ASP.Net version selection is the first drop down list.
As far as running the project, I don't quite understand your question. Just visit the web page you built as part of the project to run it. If you are doing it from the local server, simple use http://localhost/etc..
|
|
|
|
|
|
Hi
I have a nasty problem with my visual studio. I cannot enter Debug mode when click Start Debugging button its opening the web page of my solution but the solution is not in the Debug mode, I still see Start Debugging button instead of Stop and it never hits the breakpoints as it's not in debug mode.
I do the iisreset several times and remove the temporary asp.net files and iisreset and clean the solution and close and do the same thing, no change it's always the same case.
Can any one please tell me if any of you have the same problem.
Thanks in advance,
Aruna
--
http://ashakthi.blogspot.com
http://kids-articles.blogspot.com
|
|
|
|
|
gottimukkala wrote: I do the iisreset several times and remove the temporary asp.net files and iisreset and clean the solution and close and do the same thing, no change it's always the same case.
So, your site is hosted in IIS and you want to debug it from Visual Studio ?
If yes,
Did you Attach the worker Process ? Which IIS Version are you using ?
|
|
|
|
|
I am using IIS 5.1 but My site doesn'z host on IIS Server. I just did iisreset if the visual studio catches something. It was working fine since 5 days I am having this problem.
--
http://ashakthi.blogspot.com
http://kids-articles.blogspot.com
|
|
|
|
|
Hi,
If you are not using IIS then there is no sense that IISRESET will work for you.
Are you a debugger user? Is debugging enabled for the current user?
Have you set compilation debug = true for the current project?
Either you love IT or leave IT...
|
|
|
|
|
Thanks for your replies. I attched our webserver process to the debug and its working now.
--
http://ashakthi.blogspot.com
http://kids-articles.blogspot.com
|
|
|
|
|
gottimukkala wrote: I attched our webserver process to the debug and its working now.
I didn't get you ?
|
|
|
|