|
You really need to raise this on the Infragistics forums. They are usually pretty good.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I want some instructions in converting existing C# Windows Application to C# Web Application..
Please post your replies as soon as possible.
|
|
|
|
|
If the application has been properly architected it should just be a matter of rewriting the presentation (UI) layer - perhaps with the odd addition elsewhere to support a stateless model of working. If it hasn't been well architected then you are looking at rewriting the whole application.
|
|
|
|
|
Spamming different 10 forums with the same question is very rude and totally unnecessary.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I can add an attribute to each option in a drop-down list, using the System.Web.UI.WebControls.ListBox.Items.Item(ItemIndex).Attributes.Add() method, but they are ignored when the list is rendered to the web-page. How can I render them?
I'm currently adding the controls as childern to a span element, and then using the span.RenderControl(output) method to do the heavy lifting. Is there a method that I can override that specifically renders the options?
|
|
|
|
|
I'm getting this error message when trying to request my web application:
Access to the path "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files\root\6afc08f4\6af070d3" is denied.
What could be the reason and how to solve that?
Notice that I could not root\6afc08f4\6af070d3 folders in 'Temporary ASP.NET Files' folder.
IIS is configured to point to the right directory and first page.
Thanks for any help.
Here is the stack trace:
[UnauthorizedAccessException: Access to the path "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files\root\6afc08f4\6af070d3" is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
System.IO.Directory.InternalCreateDirectory(String fullPath, String path) +632
System.IO.Directory.CreateDirectory(String path) +195
System.Web.Compilation.PreservedAssemblyEntry.DoFirstTimeInit(HttpContext context) +85
System.Web.Compilation.PreservedAssemblyEntry.EnsureFirstTimeInit(HttpContext context) +97
System.Web.Compilation.PreservedAssemblyEntry.GetPreservedAssemblyEntry(HttpContext context, String virtualPath, Boolean fApplicationFile) +29
System.Web.UI.TemplateParser.GetParserCacheItemFromPreservedCompilation() +91
System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) +148
System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() +125
System.Web.UI.TemplateParser.GetParserCacheItem() +88
System.Web.UI.ApplicationFileParser.GetCompiledApplicationType(String inputFile, HttpContext context, ApplicationFileParser& parser) +171
System.Web.HttpApplicationFactory.CompileApplication(HttpContext context) +43
System.Web.HttpApplicationFactory.Init(HttpContext context) +485
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +170
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +414
|
|
|
|
|
When I have gotten these type of weird errors, I ususally make sure I have stopped and started the web site, I am sure you have already tried that. Stopped and started the app pool. If I am still getting it, I re-copy out the web site and make sure I delete all of the dlls in the bin directory before I copy the site out. Usually after those steps I won't get that error anymore.
Hope that helps.
Ben
|
|
|
|
|
I'm writing a Windows Explorer-like clone for myself.
I'm running into a problem where I still get an exception when I try to access empty drives (e.g. the floppy drive), despite having wrapped all the appropriate calls in try...catch blocks.
The odd thing is that this doesn't happen when I build the project. However, if I try to run the executable directly, I get several exceptions. Same thing happens with a release version for the executable.
Another odd thing is that sometimes I'll get 4 exceptions, all for drive A:. Other times, I'll get 2 exceptions, one for A: and one for an empty CD drive.
Any ideas?
|
|
|
|
|
gmarian wrote: Why would an exception that's been caught continue to propogate up the call stack?
One possibility: Because it's been rethrown.
|
|
|
|
|
Edit:
Your response got me thinking that I may be looking at this the wrong way.
The window that pops-up is titled ".Net-BroacastEventWindow.1.0.3300.0.1: ExplorerPlus.exe - No Disk."
When I remove the try block, this error pops up before .Net complains about the un-caught exception.
So, I think I need to ask a different question. Thank you for the obvious answer, as it's made me rethink the problem.
|
|
|
|
|
To properly thread a form which of these two looks correct?
public class MYControl
{
public MyAppWindow MyInterface;
ThreadStart GM_start;
Thread MyThread;
public MYControl()
{
MyInterface= new MyAppWindow ();
GM_start = new ThreadStart(MyInterface.Show);
MyThread= new Thread(GM_start);
MyThread.Start();
}
...
}
or is this better?
public class MYControl
{
public MyAppWindow MyInterface;
ThreadStart GM_start;
Thread MyThread;
public MYControl()
{
GM_start = new ThreadStart(StartForm);
MyThread= new Thread(GM_start);
MyThread.Start();
}
public void StartForm()
{
MyInterface= new MyAppWindow();
MyInterface.Show();
}
...
}
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
I would like to know how to compile an .ico file into a .dll file.
I know about resource files and how to use the assembly linker but I would like to create a .dll file similar to the shell32.dll file which hold standard icons in it.
thank you.
|
|
|
|
|
This would typically be produced using a resource file, the rc.exe tool to produce a .res file from the .rc file, and the C++ linker tool, link.exe .
See Creating a Resource-Only DLL[^] for details.
|
|
|
|
|
Hi,
I'm having a problem with smart tags in Word 2007.
I just can't find how to add them.
On the microsoft site their are lots of walkthroughs for VSTO 2005.
But in the VSTO 2005 SE, you can't use me.VSTOSmartTags anymore
Thanks in advance
Programming code is like magic, just use the right code (magic words) to make happen what you want..
|
|
|
|
|
Hi,
I am facing a problem ... I have a project, when i try to run the executables from a network path the assemblies fail to load. Where as the executables work perfectly fine when run from a local path. My guess is this has to do something with the .NET security. Any ideas, thoughts?????
Thanks in advance
|
|
|
|
|
Security may be one, is the .NET framework installed on the network location you are accessing? That may be the other.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
well basically both the machines are dev machines! so i have .net framework and everything else i can concieve installed on both the machines
|
|
|
|
|
I have investigated the problem .. here are my findings... my assemblies are strong name signed.. but a simple Assembly.LoadFrom(..) fails? giving me a FileLoadException? The load is successful if i do it from a local path.. but on a network path it fails!
|
|
|
|
|
That's because, by default, code comming from any network source is not trusted. You can read up on Code Access Security here[^]. Believe me, it's not something you want to just "gloss over". Read it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
Hi guys,
Please help,I am having an issue with data access block connection to the database from my class library project.
using the data access block to connect to database works fine in my website project. but i try creating a separate class library project to connect to the database i now receive an error message.
"The value can not be null or an empty string."
and this is the code:
<br />
Database motomandb = DatabaseFactory.CreateDatabase();<br />
DbCommand motomandbCommand = motomandb.GetSqlStringCommand(query);<br />
<br />
using(DbConnection motomanConnection = motomandb.CreateConnection())<br />
{<br />
DbTransaction motomanTransaction = motomanConnection.BeginTransaction();<br />
try<br />
{<br />
rowsaffected = motomandb.ExecuteNonQuery(motomandbCommand, motomanTransaction);<br />
motomanTransaction.Commit();<br />
}<br />
catch (Exception e)<br />
{<br />
motomanTransaction.Rollback();<br />
}<br />
}<br />
thanks in advance
|
|
|
|
|
saltcode wrote: i now receive an error message.
"The value can not be null or an empty string."
Where?
I'm guessing that it is having problems with the cofiguration file, but without knowing where the error occured it may be somewhere else.
|
|
|
|
|
the error occurred here.
Database motomandb = DatabaseFactory.CreateDatabase();
i don't think is the configuration file bcos i connected to the database normally from the web project appcode folder.
|
|
|
|
|
saltcode wrote: i don't think is the configuration file bcos i connected to the database normally from the web project appcode folder.
You've just extracted this out into its own class library and you are still running it as a web application? Is that right?
Have you tried stepping into the Enterprise Library code and seeing where it's failing in there? Actually, it should tell you in the stack trace for the exception exactly where in the Enterprise Library it failed. Can you copy and paste the stack trace here?
|
|
|
|
|
thanks for your time. here is the trace.
System.Configuration.ConfigurationErrorsException was unhandled by user code<br />
Message="The type Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null from configuration could not be created. (c:\\inetpub\\wwwroot\\motoman\\web.config line 57)"<br />
Source="System.Configuration"<br />
BareMessage="The type Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null from configuration could not be created."<br />
Filename="c:\\inetpub\\wwwroot\\motoman\\web.config"<br />
Line=57<br />
StackTrace:<br />
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)<br />
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)<br />
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)<br />
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)<br />
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)<br />
at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)<br />
at System.Configuration.ConfigurationManager.GetSection(String sectionName)<br />
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSourceImplementation.GetSection(String sectionName)<br />
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource.GetSection(String sectionName)<br />
at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings.GetExceptionHandlingSettings(IConfigurationSource configurationSource)<br />
at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionHandlingConfigurationView.get_ExceptionHandlingSettings()<br />
at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionHandlingConfigurationView.GetExceptionPolicyData(String policyName)<br />
at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyCustomFactory.GetConfiguration(String id, IConfigurationSource configurationSource)<br />
at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyCustomFactory.CreateObject(IBuilderContext context, String name, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)<br />
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy.BuildUp(IBuilderContext context, Type t, Object existing, String id)<br />
at Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)<br />
at Microsoft.Practices.ObjectBuilder.SingletonStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)<br />
at Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)<br />
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfigurationNameMappingStrategy.BuildUp(IBuilderContext context, Type t, Object existing, String id)<br />
at Microsoft.Practices.ObjectBuilder.BuilderBase`1.DoBuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)<br />
at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)<br />
at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp[TTypeToBuild](IReadWriteLocator locator, String idToBuild, Object existing, PolicyList[] transientPolicies)<br />
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, String id, IConfigurationSource configurationSource)<br />
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.LocatorNameTypeFactoryBase`1.Create(String name)<br />
at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.GetExceptionPolicy(Exception exception, String policyName)<br />
at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.HandleException(Exception exceptionToHandle, String policyName)<br />
at Motoman.Atn.Dal.PinNumberDB.Save(String sourcefilepath, String formatfilepath) in C:\Documents and Settings\Developer\My Documents\Visual Studio 2005\Projects\motoman\MotomanDAL\PinNumberDB.cs:line 93<br />
at Motoman.Atn.BLL.PinNumberManager.PinSaves(String filepath, String formatfilepath) in C:\Documents and Settings\Developer\My Documents\Visual Studio 2005\Projects\motoman\MotomanBLL\PinNumberManager.cs:line 31<br />
at _Default.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\motoman\Default.aspx.cs:line 18<br />
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)<br />
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)<br />
at System.Web.UI.Control.OnLoad(EventArgs e)<br />
at System.Web.UI.Control.LoadRecursive()<br />
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)<br />
|
|
|
|
|