Note that there are some explanatory texts on larger screens.

plurals
  1. POOrchard 324 no data sent error with custom module only on web server
    text
    copied!<p>I just started having a very strange issue with my custom module that has not started happening until last night. Basically when I try to request the custom view I created for the module the first couple of pages display fine and then all of a sudden the rest of those Content Item pages timeout until I recycle the app pool. (in the browser I get a 324 no data sent error). I also get no errors pertaining to this event in the error logs under the App_Data folder.</p> <p>Here is the error I receive in the Event Viewer:</p> <pre><code>3005 An unhandled exception has occurred. 12/31/2012 12:03:17 PM 12/31/2012 5:03:17 PM 59d62d1f2da347caafd2dee71266126f 43 1 0 /LM/W3SVC/10/ROOT-2-130014459492939950 Full / E:\Inetpub\Test-Website\ SERVERNAME 24756 w3wp.exe NT AUTHORITY\NETWORK SERVICE TimeoutException Transaction Timeout (the url was displayed here) admin True Forms NT AUTHORITY\NETWORK SERVICE 39 NT AUTHORITY\NETWORK SERVICE False </code></pre> <p>I do not have this issue on my dev computer (running the website on either iis or visual studio does not recreate the problem). </p> <p>I am almost positive that the module is set up so that each connection is disposed of efficiently. Also, considering that this has not happened since the site has been up (about a month now) I am guessing it has nothing to do with the code.</p> <p>Here is an example of how I set up the service classes:</p> <pre><code> namespace Example.Services { public interface IDocumentNoteService : ITransientDependency { List&lt;DocumentNoteRecord&gt; GetNotes(int? packageId, int noteTypeId); } public class DocumentNoteService : IDocumentNoteService { private readonly IRepository&lt;DocumentNoteRecord&gt; _docNoteRepo; public DocumentNoteService(IRepository&lt;DocumentNoteRecord&gt; docNoteRepo) { _docNoteRepo = docNoteRepo; Logger = NullLogger.Instance; T = NullLocalizer.Instance; } public ILogger Logger { get; set; } public Localizer T { get; set; } public List&lt;DocumentNoteRecord&gt; GetNotes(int? packageId, int noteTypeId) { try { var Notes = _docNoteRepo.Table.Where(x =&gt; x.Package_Id == packageId).Where(x =&gt; x.Note_Type_Id == noteTypeId).ToList(); _docNoteRepo.Flush(); return Notes; } catch (Exception ex) { Logger.Error(ex, "There was a problem getting the document notes for this tour."); } return Enumerable.Empty&lt;DocumentNoteRecord&gt;().ToList&lt;DocumentNoteRecord&gt;(); } } } </code></pre> <p>Here is the code for the part driver:</p> <pre><code> namespace ExampleCode.Drivers { public class TourPartDriver : ContentPartDriver&lt;TourPart&gt; { private readonly ITourPartService _tourPartService; private readonly ITourDateService _tourDateService; private readonly IItinDetailService _tourItinDetailsService; private readonly IExperiencesService _tourExpService; private readonly ITourOptionService _tourOptionService; private readonly IDestinationFactService _destinationFactService; private readonly IDestinationFactManager _destinationFactManager; private readonly IDocumentNoteService _documentNoteService; private readonly IPackageUpgradesService _packageUpgradesService; public TourPartDriver( ITourPartService tourService, ITourDateService tourDateService, IItinDetailService tourItinDetailsService, IExperiencesService tourExpService, ITourOptionService tourOptionService, IDestinationFactService destinationFactService, IDestinationFactManager destinationFactManager, IDocumentNoteService documentNoteService, IPackageUpgradesService packageUpgradesService ) { _tourPartService = tourService; _tourDateService = tourDateService; _tourItinDetailsService = tourItinDetailsService; _tourExpService = tourExpService; _tourOptionService = tourOptionService; _destinationFactService = destinationFactService; _destinationFactManager = destinationFactManager; _documentNoteService = documentNoteService; _packageUpgradesService = packageUpgradesService; Logger = NullLogger.Instance; T = NullLocalizer.Instance; } public ILogger Logger { get; set; } public Localizer T { get; set; } protected override DriverResult Display( TourPart part, string displayType, dynamic shapeHelper) { return ContentShape("Parts_Tour", () =&gt; shapeHelper.Parts_Tour( TourID: part.tour_id, TourName: part.tour_name, PackageID: part.package_id, Highlights: _tourExpService.GetTourExperiences(part.tour_id, part.package_id), Description: part.description, TourDates: _tourDateService.GetTourDatesDD(part.tour_id), TourItinDetails: _tourItinDetailsService.GetItinDetails(part.package_id), InitialTourOffsetDate: _tourDateService.GetInitialTourDateOffset(part.package_id), TourOptions: _tourOptionService.GetInitialTourOptions(part.package_id), TourPrice: _tourDateService.GetTourPrice(part.package_id), TourNumDays: _tourItinDetailsService.GetTourNumDays(part.package_id), TourNumMeals: _tourDateService.GetTourNumMeals(part.package_id), DestinationFacts:_destinationFactManager.GetCategoryFacts(part.package_id), PleaseNote: _documentNoteService.GetNotes(part.package_id, (int)NoteTypes.DocNoteType.PleaseNote), WebRemarks: _documentNoteService.GetNotes(part.package_id, (int)NoteTypes.DocNoteType.WebRemarks), Pace: _documentNoteService.GetNotes(part.package_id, (int)NoteTypes.DocNoteType.Pace), PackageUpgrades: _packageUpgradesService.GetInitialPackageUpgrades(part.package_id) )); } } } </code></pre> <p>Here is the code for the view:</p> <pre><code>@{ List&lt;DocumentNoteRecord&gt; pleaseNote = Model.PleaseNote; List&lt;DocumentNoteRecord&gt; webRemarks = Model.WebRemarks; List&lt;DocumentNoteRecord&gt; pace = Model.Pace; if (pleaseNote.Count &gt; 0) { &lt;h4 class="tourSubTitle1"&gt;Please Note&lt;/h4&gt; foreach (var note in pleaseNote) { &lt;p&gt;@Html.Raw(note.Note)&lt;/p&gt; } } if (webRemarks.Count &gt; 0) { &lt;h4 class="tourSubTitle1"&gt;Web Remarks&lt;/h4&gt; foreach (var noteRemark in webRemarks) { &lt;p&gt;@Html.Raw(noteRemark.Note)&lt;/p&gt; } } if (pace.Count &gt; 0) { &lt;h4 class="tourSubTitle1"&gt;Pace&lt;/h4&gt; foreach (var notePace in pace) { &lt;p&gt;@Html.Raw(notePace.Note)&lt;/p&gt; } } </code></pre> <p>}</p> <p>Any help would be greatly appreciated! I'm definitely in a pickle here.</p> <p>Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload